plugin-git-manager 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/client.d.ts +3 -0
  2. package/client.js +1 -0
  3. package/dist/client/100.e08d760e0b01997c.js +10 -0
  4. package/dist/client/components/CommitHistory.d.ts +2 -0
  5. package/dist/client/components/FileExplorer.d.ts +2 -0
  6. package/dist/client/components/GitManagerSettings.d.ts +2 -0
  7. package/dist/client/components/GitOperations.d.ts +2 -0
  8. package/dist/client/components/RepositoryConfig.d.ts +2 -0
  9. package/dist/client/context/GitManagerContext.d.ts +24 -0
  10. package/dist/client/index.d.ts +5 -0
  11. package/dist/client/index.js +10 -0
  12. package/dist/client/locale.d.ts +2 -0
  13. package/dist/externalVersion.js +18 -0
  14. package/dist/index.d.ts +2 -0
  15. package/dist/index.js +48 -0
  16. package/dist/locale/en-US.json +45 -0
  17. package/dist/locale/vi-VN.json +45 -0
  18. package/dist/node_modules/simple-git/dist/cjs/index.js +7399 -0
  19. package/dist/node_modules/simple-git/dist/esm/index.js +4745 -0
  20. package/dist/node_modules/simple-git/dist/esm/package.json +3 -0
  21. package/dist/node_modules/simple-git/dist/src/lib/api.d.ts +13 -0
  22. package/dist/node_modules/simple-git/dist/src/lib/args/log-format.d.ts +9 -0
  23. package/dist/node_modules/simple-git/dist/src/lib/errors/git-construct-error.d.ts +15 -0
  24. package/dist/node_modules/simple-git/dist/src/lib/errors/git-error.d.ts +30 -0
  25. package/dist/node_modules/simple-git/dist/src/lib/errors/git-plugin-error.d.ts +7 -0
  26. package/dist/node_modules/simple-git/dist/src/lib/errors/git-response-error.d.ts +32 -0
  27. package/dist/node_modules/simple-git/dist/src/lib/errors/task-configuration-error.d.ts +12 -0
  28. package/dist/node_modules/simple-git/dist/src/lib/git-factory.d.ts +15 -0
  29. package/dist/node_modules/simple-git/dist/src/lib/git-logger.d.ts +21 -0
  30. package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-branch-delete.d.ts +5 -0
  31. package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-branch.d.ts +2 -0
  32. package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-commit.d.ts +2 -0
  33. package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-diff-summary.d.ts +3 -0
  34. package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-fetch.d.ts +2 -0
  35. package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-list-log-summary.d.ts +6 -0
  36. package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-merge.d.ts +11 -0
  37. package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-move.d.ts +2 -0
  38. package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-pull.d.ts +6 -0
  39. package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-push.d.ts +4 -0
  40. package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-remote-messages.d.ts +5 -0
  41. package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-remote-objects.d.ts +3 -0
  42. package/dist/node_modules/simple-git/dist/src/lib/plugins/abort-plugin.d.ts +3 -0
  43. package/dist/node_modules/simple-git/dist/src/lib/plugins/block-unsafe-operations-plugin.d.ts +3 -0
  44. package/dist/node_modules/simple-git/dist/src/lib/plugins/command-config-prefixing-plugin.d.ts +2 -0
  45. package/dist/node_modules/simple-git/dist/src/lib/plugins/completion-detection.plugin.d.ts +3 -0
  46. package/dist/node_modules/simple-git/dist/src/lib/plugins/custom-binary.plugin.d.ts +3 -0
  47. package/dist/node_modules/simple-git/dist/src/lib/plugins/error-detection.plugin.d.ts +7 -0
  48. package/dist/node_modules/simple-git/dist/src/lib/plugins/index.d.ts +11 -0
  49. package/dist/node_modules/simple-git/dist/src/lib/plugins/plugin-store.d.ts +11 -0
  50. package/dist/node_modules/simple-git/dist/src/lib/plugins/progress-monitor-plugin.d.ts +3 -0
  51. package/dist/node_modules/simple-git/dist/src/lib/plugins/simple-git-plugin.d.ts +48 -0
  52. package/dist/node_modules/simple-git/dist/src/lib/plugins/spawn-options-plugin.d.ts +3 -0
  53. package/dist/node_modules/simple-git/dist/src/lib/plugins/suffix-paths.plugin.d.ts +2 -0
  54. package/dist/node_modules/simple-git/dist/src/lib/plugins/timout-plugin.d.ts +3 -0
  55. package/dist/node_modules/simple-git/dist/src/lib/responses/BranchDeleteSummary.d.ts +12 -0
  56. package/dist/node_modules/simple-git/dist/src/lib/responses/BranchSummary.d.ts +14 -0
  57. package/dist/node_modules/simple-git/dist/src/lib/responses/CheckIgnore.d.ts +4 -0
  58. package/dist/node_modules/simple-git/dist/src/lib/responses/CleanSummary.d.ts +9 -0
  59. package/dist/node_modules/simple-git/dist/src/lib/responses/ConfigList.d.ts +13 -0
  60. package/dist/node_modules/simple-git/dist/src/lib/responses/DiffSummary.d.ts +10 -0
  61. package/dist/node_modules/simple-git/dist/src/lib/responses/FileStatusSummary.d.ts +9 -0
  62. package/dist/node_modules/simple-git/dist/src/lib/responses/GetRemoteSummary.d.ts +11 -0
  63. package/dist/node_modules/simple-git/dist/src/lib/responses/InitSummary.d.ts +9 -0
  64. package/dist/node_modules/simple-git/dist/src/lib/responses/MergeSummary.d.ts +16 -0
  65. package/dist/node_modules/simple-git/dist/src/lib/responses/PullSummary.d.ts +25 -0
  66. package/dist/node_modules/simple-git/dist/src/lib/responses/StatusSummary.d.ts +19 -0
  67. package/dist/node_modules/simple-git/dist/src/lib/responses/TagList.d.ts +7 -0
  68. package/dist/node_modules/simple-git/dist/src/lib/runners/git-executor-chain.d.ts +25 -0
  69. package/dist/node_modules/simple-git/dist/src/lib/runners/git-executor.d.ts +14 -0
  70. package/dist/node_modules/simple-git/dist/src/lib/runners/promise-wrapped.d.ts +2 -0
  71. package/dist/node_modules/simple-git/dist/src/lib/runners/scheduler.d.ts +11 -0
  72. package/dist/node_modules/simple-git/dist/src/lib/runners/tasks-pending-queue.d.ts +23 -0
  73. package/dist/node_modules/simple-git/dist/src/lib/simple-git-api.d.ts +20 -0
  74. package/dist/node_modules/simple-git/dist/src/lib/task-callback.d.ts +2 -0
  75. package/dist/node_modules/simple-git/dist/src/lib/tasks/apply-patch.d.ts +3 -0
  76. package/dist/node_modules/simple-git/dist/src/lib/tasks/branch.d.ts +7 -0
  77. package/dist/node_modules/simple-git/dist/src/lib/tasks/change-working-directory.d.ts +2 -0
  78. package/dist/node_modules/simple-git/dist/src/lib/tasks/check-ignore.d.ts +2 -0
  79. package/dist/node_modules/simple-git/dist/src/lib/tasks/check-is-repo.d.ts +9 -0
  80. package/dist/node_modules/simple-git/dist/src/lib/tasks/checkout.d.ts +2 -0
  81. package/dist/node_modules/simple-git/dist/src/lib/tasks/clean.d.ts +25 -0
  82. package/dist/node_modules/simple-git/dist/src/lib/tasks/clone.d.ts +9 -0
  83. package/dist/node_modules/simple-git/dist/src/lib/tasks/commit.d.ts +4 -0
  84. package/dist/node_modules/simple-git/dist/src/lib/tasks/config.d.ts +8 -0
  85. package/dist/node_modules/simple-git/dist/src/lib/tasks/count-objects.d.ts +12 -0
  86. package/dist/node_modules/simple-git/dist/src/lib/tasks/diff-name-status.d.ts +12 -0
  87. package/dist/node_modules/simple-git/dist/src/lib/tasks/diff.d.ts +5 -0
  88. package/dist/node_modules/simple-git/dist/src/lib/tasks/fetch.d.ts +4 -0
  89. package/dist/node_modules/simple-git/dist/src/lib/tasks/first-commit.d.ts +2 -0
  90. package/dist/node_modules/simple-git/dist/src/lib/tasks/grep.d.ts +12 -0
  91. package/dist/node_modules/simple-git/dist/src/lib/tasks/hash-object.d.ts +5 -0
  92. package/dist/node_modules/simple-git/dist/src/lib/tasks/init.d.ts +3 -0
  93. package/dist/node_modules/simple-git/dist/src/lib/tasks/log.d.ts +32 -0
  94. package/dist/node_modules/simple-git/dist/src/lib/tasks/merge.d.ts +4 -0
  95. package/dist/node_modules/simple-git/dist/src/lib/tasks/move.d.ts +3 -0
  96. package/dist/node_modules/simple-git/dist/src/lib/tasks/pull.d.ts +3 -0
  97. package/dist/node_modules/simple-git/dist/src/lib/tasks/push.d.ts +9 -0
  98. package/dist/node_modules/simple-git/dist/src/lib/tasks/remote.d.ts +8 -0
  99. package/dist/node_modules/simple-git/dist/src/lib/tasks/reset.d.ts +11 -0
  100. package/dist/node_modules/simple-git/dist/src/lib/tasks/show.d.ts +2 -0
  101. package/dist/node_modules/simple-git/dist/src/lib/tasks/stash-list.d.ts +4 -0
  102. package/dist/node_modules/simple-git/dist/src/lib/tasks/status.d.ts +3 -0
  103. package/dist/node_modules/simple-git/dist/src/lib/tasks/sub-module.d.ts +5 -0
  104. package/dist/node_modules/simple-git/dist/src/lib/tasks/tag.d.ts +18 -0
  105. package/dist/node_modules/simple-git/dist/src/lib/tasks/task.d.ts +14 -0
  106. package/dist/node_modules/simple-git/dist/src/lib/tasks/version.d.ts +9 -0
  107. package/dist/node_modules/simple-git/dist/src/lib/types/handlers.d.ts +21 -0
  108. package/dist/node_modules/simple-git/dist/src/lib/types/index.d.ts +136 -0
  109. package/dist/node_modules/simple-git/dist/src/lib/types/tasks.d.ts +19 -0
  110. package/dist/node_modules/simple-git/dist/src/lib/utils/argument-filters.d.ts +14 -0
  111. package/dist/node_modules/simple-git/dist/src/lib/utils/exit-codes.d.ts +10 -0
  112. package/dist/node_modules/simple-git/dist/src/lib/utils/git-output-streams.d.ts +7 -0
  113. package/dist/node_modules/simple-git/dist/src/lib/utils/index.d.ts +8 -0
  114. package/dist/node_modules/simple-git/dist/src/lib/utils/line-parser.d.ts +15 -0
  115. package/dist/node_modules/simple-git/dist/src/lib/utils/simple-git-options.d.ts +2 -0
  116. package/dist/node_modules/simple-git/dist/src/lib/utils/task-options.d.ts +13 -0
  117. package/dist/node_modules/simple-git/dist/src/lib/utils/task-parser.d.ts +5 -0
  118. package/dist/node_modules/simple-git/dist/src/lib/utils/util.d.ts +47 -0
  119. package/dist/node_modules/simple-git/dist/typings/errors.d.ts +5 -0
  120. package/dist/node_modules/simple-git/dist/typings/index.d.ts +14 -0
  121. package/dist/node_modules/simple-git/dist/typings/response.d.ts +556 -0
  122. package/dist/node_modules/simple-git/dist/typings/simple-git.d.ts +1033 -0
  123. package/dist/node_modules/simple-git/dist/typings/types.d.ts +22 -0
  124. package/dist/node_modules/simple-git/node_modules/debug/package.json +64 -0
  125. package/dist/node_modules/simple-git/node_modules/debug/src/browser.js +272 -0
  126. package/dist/node_modules/simple-git/node_modules/debug/src/common.js +292 -0
  127. package/dist/node_modules/simple-git/node_modules/debug/src/index.js +10 -0
  128. package/dist/node_modules/simple-git/node_modules/debug/src/node.js +263 -0
  129. package/dist/node_modules/simple-git/package.json +1 -0
  130. package/dist/node_modules/simple-git/promise.js +17 -0
  131. package/dist/server/actions/git-actions.d.ts +13 -0
  132. package/dist/server/actions/git-actions.js +354 -0
  133. package/dist/server/collections/gitRepositories.d.ts +2 -0
  134. package/dist/server/collections/gitRepositories.js +75 -0
  135. package/dist/server/index.d.ts +2 -0
  136. package/dist/server/index.js +48 -0
  137. package/dist/server/plugin.d.ts +6 -0
  138. package/dist/server/plugin.js +120 -0
  139. package/package.json +32 -0
  140. package/server.d.ts +2 -0
  141. package/server.js +1 -0
  142. package/src/client/components/CommitHistory.tsx +326 -0
  143. package/src/client/components/FileExplorer.tsx +329 -0
  144. package/src/client/components/GitManagerSettings.tsx +123 -0
  145. package/src/client/components/GitOperations.tsx +195 -0
  146. package/src/client/components/RepositoryConfig.tsx +188 -0
  147. package/src/client/context/GitManagerContext.tsx +84 -0
  148. package/src/client/index.tsx +19 -0
  149. package/src/client/locale.ts +9 -0
  150. package/src/index.ts +2 -0
  151. package/src/locale/en-US.json +45 -0
  152. package/src/locale/vi-VN.json +45 -0
  153. package/src/server/actions/git-actions.ts +346 -0
  154. package/src/server/collections/gitRepositories.ts +45 -0
  155. package/src/server/index.ts +2 -0
  156. package/src/server/plugin.ts +81 -0
@@ -0,0 +1,1033 @@
1
+ import * as resp from './response';
2
+ import * as types from './types';
3
+ import { GitError } from './errors';
4
+
5
+ export interface SimpleGitFactory {
6
+ (baseDir?: string, options?: Partial<types.SimpleGitOptions>): SimpleGit;
7
+
8
+ (baseDir: string): SimpleGit;
9
+
10
+ (options: Partial<types.SimpleGitOptions>): SimpleGit;
11
+ }
12
+
13
+ export type Response<T> = SimpleGit & Promise<T>;
14
+
15
+ export interface SimpleGitBase {
16
+ /**
17
+ * Adds one or more files to source control
18
+ */
19
+ add(files: string | string[], callback?: types.SimpleGitTaskCallback<string>): Response<string>;
20
+
21
+ /**
22
+ * Sets the working directory of the subsequent commands.
23
+ */
24
+ cwd(
25
+ directory: { path: string; root?: boolean },
26
+ callback?: types.SimpleGitTaskCallback<string>
27
+ ): Response<string>;
28
+
29
+ cwd<path extends string>(
30
+ directory: path,
31
+ callback?: types.SimpleGitTaskCallback<path>
32
+ ): Response<path>;
33
+
34
+ /**
35
+ * Compute object ID from a file
36
+ */
37
+ hashObject(path: string, callback?: types.SimpleGitTaskCallback): Response<string>;
38
+
39
+ hashObject(
40
+ path: string,
41
+ write?: boolean,
42
+ callback?: types.SimpleGitTaskCallback
43
+ ): Response<string>;
44
+
45
+ /**
46
+ * Initialize a git repo
47
+ */
48
+ init(
49
+ bare: boolean,
50
+ options?: types.TaskOptions,
51
+ callback?: types.SimpleGitTaskCallback<resp.InitResult>
52
+ ): Response<resp.InitResult>;
53
+
54
+ init(
55
+ bare: boolean,
56
+ callback?: types.SimpleGitTaskCallback<resp.InitResult>
57
+ ): Response<resp.InitResult>;
58
+
59
+ init(
60
+ options?: types.TaskOptions,
61
+ callback?: types.SimpleGitTaskCallback<resp.InitResult>
62
+ ): Response<resp.InitResult>;
63
+
64
+ init(callback?: types.SimpleGitTaskCallback<resp.InitResult>): Response<resp.InitResult>;
65
+
66
+ /**
67
+ * Runs a merge, `options` can be either an array of arguments
68
+ * supported by the [`git merge`](https://git-scm.com/docs/git-merge)
69
+ * or an options object.
70
+ *
71
+ * Conflicts during the merge result in an error response,
72
+ * the response type whether it was an error or success will be a MergeSummary instance.
73
+ * When successful, the MergeSummary has all detail from a the PullSummary
74
+ *
75
+ * @see https://github.com/steveukx/git-js/blob/master/src/responses/MergeSummary.js
76
+ * @see https://github.com/steveukx/git-js/blob/master/src/responses/PullSummary.js
77
+ */
78
+ merge(
79
+ options: types.TaskOptions,
80
+ callback?: types.SimpleGitTaskCallback<resp.MergeResult>
81
+ ): Response<resp.MergeResult>;
82
+
83
+ /**
84
+ * Merges from one branch to another, equivalent to running `git merge ${remote} ${branch}`, the `options` argument can
85
+ * either be an array of additional parameters to pass to the command or null / omitted to be ignored.
86
+ */
87
+ mergeFromTo<E extends GitError>(
88
+ remote: string,
89
+ branch: string,
90
+ options?: types.TaskOptions,
91
+ callback?: types.SimpleGitTaskCallback<resp.MergeResult, E>
92
+ ): Response<resp.MergeResult>;
93
+
94
+ mergeFromTo<E extends GitError>(
95
+ remote: string,
96
+ branch: string,
97
+ callback?: types.SimpleGitTaskCallback<resp.MergeResult, E>
98
+ ): Response<resp.MergeResult>;
99
+
100
+ /**
101
+ * Sets a handler function to be called whenever a new child process is created, the handler function will be called
102
+ * with the name of the command being run and the stdout & stderr streams used by the ChildProcess.
103
+ *
104
+ * @example
105
+ * require('simple-git')
106
+ * .outputHandler(function (command, stdout, stderr) {
107
+ * stdout.pipe(process.stdout);
108
+ * })
109
+ * .checkout('https://github.com/user/repo.git');
110
+ *
111
+ * @see https://nodejs.org/api/child_process.html#child_process_class_childprocess
112
+ * @see https://nodejs.org/api/stream.html#stream_class_stream_readable
113
+ */
114
+ outputHandler(handler: types.outputHandler | void): this;
115
+
116
+ /**
117
+ * Pushes the current committed changes to a remote, optionally specify the names of the remote and branch to use
118
+ * when pushing. Supply multiple options as an array of strings in the first argument - see examples below.
119
+ */
120
+ push(
121
+ remote?: string,
122
+ branch?: string,
123
+ options?: types.TaskOptions,
124
+ callback?: types.SimpleGitTaskCallback<resp.PushResult>
125
+ ): Response<resp.PushResult>;
126
+
127
+ push(
128
+ options?: types.TaskOptions,
129
+ callback?: types.SimpleGitTaskCallback<resp.PushResult>
130
+ ): Response<resp.PushResult>;
131
+
132
+ push(callback?: types.SimpleGitTaskCallback<resp.PushResult>): Response<resp.PushResult>;
133
+
134
+ /**
135
+ * Stash the local repo
136
+ */
137
+ stash(
138
+ options?: types.TaskOptions,
139
+ callback?: types.SimpleGitTaskCallback<string>
140
+ ): Response<string>;
141
+
142
+ stash(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
143
+
144
+ /**
145
+ * Show the working tree status.
146
+ */
147
+ status(
148
+ options?: types.TaskOptions,
149
+ callback?: types.SimpleGitTaskCallback<resp.StatusResult>
150
+ ): Response<resp.StatusResult>;
151
+
152
+ status(callback?: types.SimpleGitTaskCallback<resp.StatusResult>): Response<resp.StatusResult>;
153
+ }
154
+
155
+ export interface SimpleGit extends SimpleGitBase {
156
+ /**
157
+ * Add an annotated tag to the head of the current branch
158
+ */
159
+ addAnnotatedTag(
160
+ tagName: string,
161
+ tagMessage: string,
162
+ callback?: types.SimpleGitTaskCallback<{ name: string }>
163
+ ): Response<{ name: string }>;
164
+
165
+ /**
166
+ * Add config to local git instance for the specified `key` (eg: user.name) and value (eg: 'your name').
167
+ * Set `append` to true to append to rather than overwrite the key
168
+ */
169
+ addConfig(
170
+ key: string,
171
+ value: string,
172
+ append?: boolean,
173
+ scope?: keyof typeof types.GitConfigScope,
174
+ callback?: types.SimpleGitTaskCallback<string>
175
+ ): Response<string>;
176
+
177
+ addConfig(
178
+ key: string,
179
+ value: string,
180
+ append?: boolean,
181
+ callback?: types.SimpleGitTaskCallback<string>
182
+ ): Response<string>;
183
+
184
+ addConfig(
185
+ key: string,
186
+ value: string,
187
+ callback?: types.SimpleGitTaskCallback<string>
188
+ ): Response<string>;
189
+
190
+ /**
191
+ * Applies a patch to the repo
192
+ */
193
+ applyPatch(
194
+ patches: string | string[],
195
+ options: types.TaskOptions<types.ApplyOptions>,
196
+ callback?: types.SimpleGitTaskCallback<string>
197
+ ): Response<string>;
198
+
199
+ applyPatch(
200
+ patches: string | string[],
201
+ callback?: types.SimpleGitTaskCallback<string>
202
+ ): Response<string>;
203
+
204
+ /**
205
+ * Configuration values visible to git in the current working directory
206
+ */
207
+ listConfig(
208
+ scope: keyof typeof types.GitConfigScope,
209
+ callback?: types.SimpleGitTaskCallback<resp.ConfigListSummary>
210
+ ): Response<resp.ConfigListSummary>;
211
+
212
+ listConfig(
213
+ callback?: types.SimpleGitTaskCallback<resp.ConfigListSummary>
214
+ ): Response<resp.ConfigListSummary>;
215
+
216
+ /**
217
+ * Adds a remote to the list of remotes.
218
+ *
219
+ * - `remoteName` Name of the repository - eg "upstream"
220
+ * - `remoteRepo` Fully qualified SSH or HTTP(S) path to the remote repo
221
+ * - `options` Optional additional settings permitted by the `git remote add` command, merged into the command prior to the repo name and remote url
222
+ */
223
+ addRemote(
224
+ remoteName: string,
225
+ remoteRepo: string,
226
+ options?: types.TaskOptions,
227
+ callback?: types.SimpleGitTaskCallback<string>
228
+ ): Response<string>;
229
+
230
+ addRemote(
231
+ remoteName: string,
232
+ remoteRepo: string,
233
+ callback?: types.SimpleGitTaskCallback<string>
234
+ ): Response<string>;
235
+
236
+ /**
237
+ * Add a lightweight tag to the head of the current branch
238
+ */
239
+ addTag(
240
+ name: string,
241
+ callback?: types.SimpleGitTaskCallback<{ name: string }>
242
+ ): Response<{ name: string }>;
243
+
244
+ /**
245
+ * Equivalent to `catFile` but will return the native `Buffer` of content from the git command's stdout.
246
+ */
247
+ binaryCatFile(options: string[], callback?: types.SimpleGitTaskCallback<any>): Response<any>;
248
+
249
+ /**
250
+ * List all branches
251
+ */
252
+ branch(
253
+ options?: types.TaskOptions,
254
+ callback?: types.SimpleGitTaskCallback<resp.BranchSummary>
255
+ ): Response<resp.BranchSummary>;
256
+
257
+ /**
258
+ * List of local branches
259
+ */
260
+ branchLocal(
261
+ callback?: types.SimpleGitTaskCallback<resp.BranchSummary>
262
+ ): Response<resp.BranchSummary>;
263
+
264
+ /**
265
+ * Returns a list of objects in a tree based on commit hash.
266
+ * Passing in an object hash returns the object's content, size, and type.
267
+ *
268
+ * Passing "-p" will instruct cat-file to determine the object type, and display its formatted contents.
269
+ *
270
+ * @see https://git-scm.com/docs/git-cat-file
271
+ */
272
+ catFile(options: string[], callback?: types.SimpleGitTaskCallback<string>): Response<string>;
273
+
274
+ catFile(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
275
+
276
+ /**
277
+ * Check if a pathname or pathnames are excluded by .gitignore
278
+ *
279
+ */
280
+ checkIgnore(
281
+ pathNames: string[],
282
+ callback?: types.SimpleGitTaskCallback<string[]>
283
+ ): Response<string[]>;
284
+
285
+ checkIgnore(path: string, callback?: types.SimpleGitTaskCallback<string[]>): Response<string[]>;
286
+
287
+ /**
288
+ * Validates that the current working directory is a valid git repo file path.
289
+ *
290
+ * To make a more specific assertion of the repo, add the `action` argument:
291
+ *
292
+ * - `bare` to validate that the working directory is inside a bare repo.
293
+ * - `root` to validate that the working directory is the root of a repo.
294
+ * - `tree` (default value when omitted) to simply validate that the working
295
+ * directory is the descendent of a repo
296
+ */
297
+ checkIsRepo(
298
+ action?: types.CheckRepoActions,
299
+ callback?: types.SimpleGitTaskCallback<boolean>
300
+ ): Response<boolean>;
301
+
302
+ checkIsRepo(callback?: types.SimpleGitTaskCallback<boolean>): Response<boolean>;
303
+
304
+ /**
305
+ * Checkout a tag or revision, any number of additional arguments can be passed to the `git checkout` command
306
+ * by supplying either a string or array of strings as the `what` parameter.
307
+ */
308
+ checkout(
309
+ what: string,
310
+ options?: types.TaskOptions,
311
+ callback?: types.SimpleGitTaskCallback<string>
312
+ ): Response<string>;
313
+
314
+ checkout(what: string, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
315
+
316
+ checkout(
317
+ options?: types.TaskOptions,
318
+ callback?: types.SimpleGitTaskCallback<string>
319
+ ): Response<string>;
320
+
321
+ /**
322
+ * Checkout a remote branch - equivalent to `git checkout -b ${branchName} ${startPoint}`
323
+ *
324
+ * - branchName name of branch.
325
+ * - startPoint (e.g origin/development).
326
+ */
327
+ checkoutBranch(
328
+ branchName: string,
329
+ startPoint: string,
330
+ callback?: types.SimpleGitTaskCallback<void>
331
+ ): Response<void>;
332
+
333
+ checkoutBranch(
334
+ branchName: string,
335
+ startPoint: string,
336
+ options?: types.TaskOptions,
337
+ callback?: types.SimpleGitTaskCallback<void>
338
+ ): Response<void>;
339
+
340
+ /**
341
+ * Internally uses pull and tags to get the list of tags then checks out the latest tag.
342
+ */
343
+ checkoutLatestTag(
344
+ branchName: string,
345
+ startPoint: string,
346
+ callback?: types.SimpleGitTaskCallback<void>
347
+ ): Response<void>;
348
+
349
+ /**
350
+ * Checkout a local branch - equivalent to `git checkout -b ${branchName}`
351
+ */
352
+ checkoutLocalBranch(
353
+ branchName: string,
354
+ callback?: types.SimpleGitTaskCallback<void>
355
+ ): Response<void>;
356
+
357
+ checkoutLocalBranch(
358
+ branchName: string,
359
+ options?: types.TaskOptions,
360
+ callback?: types.SimpleGitTaskCallback<void>
361
+ ): Response<void>;
362
+
363
+ /**
364
+ * Deletes unwanted content from the local repo - when supplying the first argument as
365
+ * an array of `CleanOptions`, the array must include one of `CleanOptions.FORCE` or
366
+ * `CleanOptions.DRY_RUN`.
367
+ *
368
+ * eg:
369
+ *
370
+ * ```typescript
371
+ await git.clean(CleanOptions.FORCE);
372
+ await git.clean(CleanOptions.DRY_RUN + CleanOptions.RECURSIVE);
373
+ await git.clean(CleanOptions.FORCE, ['./path']);
374
+ await git.clean(CleanOptions.IGNORED + CleanOptions.FORCE, {'./path': null});
375
+ * ```
376
+ */
377
+ clean(
378
+ args: types.CleanOptions[],
379
+ options?: types.TaskOptions,
380
+ callback?: types.SimpleGitTaskCallback<resp.CleanSummary>
381
+ ): Response<resp.CleanSummary>;
382
+
383
+ clean(
384
+ mode: types.CleanMode | string,
385
+ options?: types.TaskOptions,
386
+ callback?: types.SimpleGitTaskCallback<resp.CleanSummary>
387
+ ): Response<resp.CleanSummary>;
388
+
389
+ clean(
390
+ mode: types.CleanMode | string,
391
+ callback?: types.SimpleGitTaskCallback<resp.CleanSummary>
392
+ ): Response<resp.CleanSummary>;
393
+
394
+ clean(options?: types.TaskOptions): Response<resp.CleanSummary>;
395
+
396
+ clean(callback?: types.SimpleGitTaskCallback<resp.CleanSummary>): Response<resp.CleanSummary>;
397
+
398
+ /**
399
+ * @deprecated
400
+ * Removed in v2, use `abortPlugin` configuration to abort execution of pending tasks.
401
+ */
402
+ clearQueue(): this;
403
+
404
+ /**
405
+ * Clone a repository into a new directory.
406
+ *
407
+ * - repoPath repository url to clone e.g. https://github.com/steveukx/git-js.git
408
+ * - localPath local folder path to clone to.
409
+ * - options supported by [git](https://git-scm.com/docs/git-clone).
410
+ */
411
+ clone(
412
+ repoPath: string,
413
+ localPath: string,
414
+ options?: types.TaskOptions,
415
+ callback?: types.SimpleGitTaskCallback<string>
416
+ ): Response<string>;
417
+
418
+ clone(
419
+ repoPath: string,
420
+ options?: types.TaskOptions,
421
+ callback?: types.SimpleGitTaskCallback<string>
422
+ ): Response<string>;
423
+
424
+ /**
425
+ * Commits changes in the current working directory - when specific file paths are supplied, only changes on those
426
+ * files will be committed.
427
+ */
428
+ commit(
429
+ message: string | string[],
430
+ files?: string | string[],
431
+ options?: types.Options,
432
+ callback?: types.SimpleGitTaskCallback<resp.CommitResult>
433
+ ): Response<resp.CommitResult>;
434
+
435
+ commit(
436
+ message: string | string[],
437
+ options?: types.TaskOptions,
438
+ callback?: types.SimpleGitTaskCallback<resp.CommitResult>
439
+ ): Response<resp.CommitResult>;
440
+
441
+ commit(
442
+ message: string | string[],
443
+ files?: string | string[],
444
+ callback?: types.SimpleGitTaskCallback<resp.CommitResult>
445
+ ): Response<resp.CommitResult>;
446
+
447
+ commit(
448
+ message: string | string[],
449
+ callback?: types.SimpleGitTaskCallback<resp.CommitResult>
450
+ ): Response<resp.CommitResult>;
451
+
452
+ /**
453
+ * Retrieves `git` disk usage information, see https://git-scm.com/docs/git-count-objects
454
+ */
455
+ countObjects(
456
+ callback?: types.SimpleGitTaskCallback<types.VersionResult>
457
+ ): Response<types.CountObjectsResult>;
458
+
459
+ /**
460
+ * Sets the path to a custom git binary, should either be `git` when there is an installation of git available on
461
+ * the system path, or a fully qualified path to the executable.
462
+ */
463
+ customBinary(command: Exclude<types.SimpleGitOptions['binary'], undefined>): this;
464
+
465
+ /**
466
+ * Delete one local branch. Supply the branchName as a string to return a
467
+ * single `BranchDeletionSummary` instances.
468
+ *
469
+ * - branchName name of branch
470
+ * - forceDelete (optional, defaults to false) set to true to forcibly delete unmerged branches
471
+ */
472
+ deleteLocalBranch(
473
+ branchName: string,
474
+ forceDelete?: boolean,
475
+ callback?: types.SimpleGitTaskCallback<resp.BranchSingleDeleteResult>
476
+ ): Response<resp.BranchSingleDeleteResult>;
477
+
478
+ deleteLocalBranch(
479
+ branchName: string,
480
+ callback?: types.SimpleGitTaskCallback<resp.BranchSingleDeleteResult>
481
+ ): Response<resp.BranchSingleDeleteResult>;
482
+
483
+ /**
484
+ * Delete one or more local branches. Supply the branchName as a string to return a
485
+ * single `BranchDeletionSummary` or as an array of branch names to return an array of
486
+ * `BranchDeletionSummary` instances.
487
+ *
488
+ * - branchNames name of branch or array of branch names
489
+ * - forceDelete (optional, defaults to false) set to true to forcibly delete unmerged branches
490
+ */
491
+ deleteLocalBranches(
492
+ branchNames: string[],
493
+ forceDelete?: boolean,
494
+ callback?: types.SimpleGitTaskCallback<resp.BranchMultiDeleteResult>
495
+ ): Response<resp.BranchMultiDeleteResult>;
496
+
497
+ /**
498
+ * Get the diff of the current repo compared to the last commit with a set of options supplied as a string.
499
+ */
500
+ diff(
501
+ options?: types.TaskOptions,
502
+ callback?: types.SimpleGitTaskCallback<string>
503
+ ): Response<string>;
504
+
505
+ /**
506
+ * Gets a summary of the diff for files in the repo, uses the `git diff --stat` format to calculate changes.
507
+ *
508
+ * in order to get staged (only): `--cached` or `--staged`.
509
+ */
510
+ diffSummary(
511
+ command: string | number,
512
+ options: types.TaskOptions,
513
+ callback?: types.SimpleGitTaskCallback<resp.DiffResult>
514
+ ): Response<resp.DiffResult>;
515
+
516
+ diffSummary(
517
+ command: string | number,
518
+ callback?: types.SimpleGitTaskCallback<resp.DiffResult>
519
+ ): Response<resp.DiffResult>;
520
+
521
+ diffSummary(
522
+ options: types.TaskOptions,
523
+ callback?: types.SimpleGitTaskCallback<resp.DiffResult>
524
+ ): Response<resp.DiffResult>;
525
+
526
+ diffSummary(callback?: types.SimpleGitTaskCallback<resp.DiffResult>): Response<resp.DiffResult>;
527
+
528
+ /**
529
+ * Sets an environment variable for the spawned child process, either supply both a name and value as strings or
530
+ * a single object to entirely replace the current environment variables.
531
+ *
532
+ * @param {string|Object} name
533
+ * @param {string} [value]
534
+ */
535
+ env(name: string, value: string): this;
536
+
537
+ env(env: object): this;
538
+
539
+ /**
540
+ * Calls the supplied `handle` function at the next step in the chain, used to run arbitrary functions synchronously
541
+ * before the next task in the git API.
542
+ */
543
+ exec(handle: () => void): Response<void>;
544
+
545
+ /**
546
+ * Updates the local working copy database with changes from the default remote repo and branch.
547
+ */
548
+ fetch(
549
+ remote: string,
550
+ branch: string,
551
+ options?: types.TaskOptions,
552
+ callback?: types.SimpleGitTaskCallback<resp.FetchResult>
553
+ ): Response<resp.FetchResult>;
554
+
555
+ fetch(
556
+ remote: string,
557
+ branch: string,
558
+ callback?: types.SimpleGitTaskCallback<resp.FetchResult>
559
+ ): Response<resp.FetchResult>;
560
+
561
+ fetch(
562
+ remote: string,
563
+ options?: types.TaskOptions,
564
+ callback?: types.SimpleGitTaskCallback<resp.FetchResult>
565
+ ): Response<resp.FetchResult>;
566
+
567
+ fetch(
568
+ options?: types.TaskOptions,
569
+ callback?: types.SimpleGitTaskCallback<resp.FetchResult>
570
+ ): Response<resp.FetchResult>;
571
+
572
+ fetch(callback?: types.SimpleGitTaskCallback<resp.FetchResult>): Response<resp.FetchResult>;
573
+
574
+ /**
575
+ * Gets the commit hash of the first commit in the repo
576
+ */
577
+ firstCommit(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
578
+
579
+ /**
580
+ * Gets the current value of a configuration property by it key, optionally specify the scope in which
581
+ * to run the command (omit / set to `undefined` to check in the complete overlaid configuration visible
582
+ * to the `git` process).
583
+ */
584
+ getConfig(
585
+ key: string,
586
+ scope?: keyof typeof types.GitConfigScope,
587
+ callback?: types.SimpleGitTaskCallback<string>
588
+ ): Response<resp.ConfigGetResult>;
589
+
590
+ /**
591
+ * Gets the currently available remotes, setting the optional verbose argument to true includes additional
592
+ * detail on the remotes themselves.
593
+ */
594
+ getRemotes(
595
+ callback?: types.SimpleGitTaskCallback<types.RemoteWithoutRefs[]>
596
+ ): Response<types.RemoteWithoutRefs[]>;
597
+
598
+ getRemotes(
599
+ verbose?: false,
600
+ callback?: types.SimpleGitTaskCallback<types.RemoteWithoutRefs[]>
601
+ ): Response<types.RemoteWithoutRefs[]>;
602
+
603
+ getRemotes(
604
+ verbose: true,
605
+ callback?: types.SimpleGitTaskCallback<types.RemoteWithRefs[]>
606
+ ): Response<types.RemoteWithRefs[]>;
607
+
608
+ /**
609
+ * Search for files matching the supplied search terms
610
+ */
611
+ grep(
612
+ searchTerm: string | types.GitGrepQuery,
613
+ callback?: types.SimpleGitTaskCallback<resp.GrepResult>
614
+ ): Response<resp.GrepResult>;
615
+
616
+ grep(
617
+ searchTerm: string | types.GitGrepQuery,
618
+ options?: types.TaskOptions,
619
+ callback?: types.SimpleGitTaskCallback<resp.GrepResult>
620
+ ): Response<resp.GrepResult>;
621
+
622
+ /**
623
+ * List remotes by running the `ls-remote` command with any number of arbitrary options
624
+ * in either array of object form.
625
+ */
626
+ listRemote(
627
+ args?: types.TaskOptions,
628
+ callback?: types.SimpleGitTaskCallback<string>
629
+ ): Response<string>;
630
+
631
+ /**
632
+ * Show commit logs from `HEAD` to the first commit.
633
+ * If provided between `options.from` and `options.to` tags or branch.
634
+ *
635
+ * You can provide `options.file`, which is the path to a file in your repository. Then only this file will be considered.
636
+ *
637
+ * To use a custom splitter in the log format, set `options.splitter` to be the string the log should be split on.
638
+ *
639
+ * By default the following fields will be part of the result:
640
+ * `hash`: full commit hash
641
+ * `date`: author date, ISO 8601-like format
642
+ * `message`: subject + ref names, like the --decorate option of git-log
643
+ * `author_name`: author name
644
+ * `author_email`: author mail
645
+ * You can specify `options.format` to be an mapping from key to a format option like `%H` (for commit hash).
646
+ * The fields specified in `options.format` will be the fields in the result.
647
+ *
648
+ * Options can also be supplied as a standard options object for adding custom properties supported by the git log command.
649
+ * For any other set of options, supply options as an array of strings to be appended to the git log command.
650
+ *
651
+ * @returns Response<ListLogSummary>
652
+ *
653
+ * @see https://git-scm.com/docs/git-log
654
+ */
655
+ log<T = types.DefaultLogFields>(
656
+ options?: types.TaskOptions | types.LogOptions<T>,
657
+ callback?: types.SimpleGitTaskCallback<resp.LogResult<T>>
658
+ ): Response<resp.LogResult<T>>;
659
+
660
+ /**
661
+ * Mirror a git repo
662
+ *
663
+ * Equivalent to `git.clone(repoPath, localPath, ['--mirror'])`, `clone` allows
664
+ * for additional task options.
665
+ */
666
+ mirror(
667
+ repoPath: string,
668
+ localPath: string,
669
+ callback?: types.SimpleGitTaskCallback<string>
670
+ ): Response<string>;
671
+
672
+ /**
673
+ * Moves one or more files to a new destination.
674
+ *
675
+ * @see https://git-scm.com/docs/git-mv
676
+ */
677
+ mv(
678
+ from: string | string[],
679
+ to: string,
680
+ callback?: types.SimpleGitTaskCallback<resp.MoveSummary>
681
+ ): Response<resp.MoveSummary>;
682
+
683
+ /**
684
+ * Fetch from and integrate with another repository or a local branch. In the case that the `git pull` fails with a
685
+ * recognised fatal error, the exception thrown by this function will be a `GitResponseError<PullFailedResult>`.
686
+ */
687
+ pull(
688
+ remote?: string,
689
+ branch?: string,
690
+ options?: types.TaskOptions,
691
+ callback?: types.SimpleGitTaskCallback<resp.PullResult>
692
+ ): Response<resp.PullResult>;
693
+
694
+ pull(
695
+ options?: types.TaskOptions,
696
+ callback?: types.SimpleGitTaskCallback<resp.PullResult>
697
+ ): Response<resp.PullResult>;
698
+
699
+ pull(callback?: types.SimpleGitTaskCallback<resp.PullResult>): Response<resp.PullResult>;
700
+
701
+ /**
702
+ * Pushes the current tag changes to a remote which can be either a URL or named remote. When not specified uses the
703
+ * default configured remote spec.
704
+ */
705
+ pushTags(
706
+ remote: string,
707
+ options?: types.TaskOptions,
708
+ callback?: types.SimpleGitTaskCallback<resp.PushResult>
709
+ ): Response<resp.PushResult>;
710
+
711
+ pushTags(
712
+ options?: types.TaskOptions,
713
+ callback?: types.SimpleGitTaskCallback<resp.PushResult>
714
+ ): Response<resp.PushResult>;
715
+
716
+ pushTags(callback?: types.SimpleGitTaskCallback<resp.PushResult>): Response<resp.PushResult>;
717
+
718
+ /**
719
+ * Executes any command against the git binary.
720
+ */
721
+ raw(
722
+ commands: string | string[] | types.TaskOptions,
723
+ callback?: types.SimpleGitTaskCallback<string>
724
+ ): Response<string>;
725
+
726
+ raw(
727
+ options: types.TaskOptions,
728
+ callback?: types.SimpleGitTaskCallback<string>
729
+ ): Response<string>;
730
+
731
+ raw(...commands: string[]): Response<string>;
732
+
733
+ // leading varargs with trailing options/callback
734
+ raw(
735
+ a: string,
736
+ options: types.TaskOptions,
737
+ callback?: types.SimpleGitTaskCallback<string>
738
+ ): Response<string>;
739
+
740
+ raw(
741
+ a: string,
742
+ b: string,
743
+ options: types.TaskOptions,
744
+ callback?: types.SimpleGitTaskCallback<string>
745
+ ): Response<string>;
746
+
747
+ raw(
748
+ a: string,
749
+ b: string,
750
+ c: string,
751
+ options: types.TaskOptions,
752
+ callback?: types.SimpleGitTaskCallback<string>
753
+ ): Response<string>;
754
+
755
+ raw(
756
+ a: string,
757
+ b: string,
758
+ c: string,
759
+ d: string,
760
+ options: types.TaskOptions,
761
+ callback?: types.SimpleGitTaskCallback<string>
762
+ ): Response<string>;
763
+
764
+ raw(
765
+ a: string,
766
+ b: string,
767
+ c: string,
768
+ d: string,
769
+ e: string,
770
+ options: types.TaskOptions,
771
+ callback?: types.SimpleGitTaskCallback<string>
772
+ ): Response<string>;
773
+
774
+ // leading varargs with trailing callback
775
+ raw(a: string, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
776
+
777
+ raw(a: string, b: string, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
778
+
779
+ raw(
780
+ a: string,
781
+ b: string,
782
+ c: string,
783
+ callback?: types.SimpleGitTaskCallback<string>
784
+ ): Response<string>;
785
+
786
+ raw(
787
+ a: string,
788
+ b: string,
789
+ c: string,
790
+ d: string,
791
+ callback?: types.SimpleGitTaskCallback<string>
792
+ ): Response<string>;
793
+
794
+ raw(
795
+ a: string,
796
+ b: string,
797
+ c: string,
798
+ d: string,
799
+ e: string,
800
+ callback?: types.SimpleGitTaskCallback<string>
801
+ ): Response<string>;
802
+
803
+ /**
804
+ * Rebases the current working copy. Options can be supplied either as an array of string parameters
805
+ * to be sent to the `git rebase` command, or a standard options object.
806
+ */
807
+ rebase(
808
+ options?: types.TaskOptions,
809
+ callback?: types.SimpleGitTaskCallback<string>
810
+ ): Response<string>;
811
+
812
+ rebase(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
813
+
814
+ /**
815
+ * Call any `git remote` function with arguments passed as an array of strings.
816
+ */
817
+ remote(
818
+ options: string[],
819
+ callback?: types.SimpleGitTaskCallback<void | string>
820
+ ): Response<void | string>;
821
+
822
+ /**
823
+ * Removes an entry from the list of remotes.
824
+ *
825
+ * - remoteName Name of the repository - eg "upstream"
826
+ */
827
+ removeRemote(remoteName: string, callback?: types.SimpleGitTaskCallback<void>): Response<void>;
828
+
829
+ /**
830
+ * Reset a repo. Called without arguments this is a soft reset for the whole repo,
831
+ * for explicitly setting the reset mode, supply the first argument as one of the
832
+ * supported reset modes.
833
+ *
834
+ * Trailing options argument can be either a string array, or an extension of the
835
+ * ResetOptions, use this argument for supplying arbitrary additional arguments,
836
+ * such as restricting the pathspec.
837
+ *
838
+ * ```typescript
839
+ // equivalent to each other
840
+ simpleGit().reset(ResetMode.HARD, ['--', 'my-file.txt']);
841
+ simpleGit().reset(['--hard', '--', 'my-file.txt']);
842
+ simpleGit().reset(ResetMode.HARD, {'--': null, 'my-file.txt': null});
843
+ simpleGit().reset({'--hard': null, '--': null, 'my-file.txt': null});
844
+ ```
845
+ */
846
+ reset(
847
+ mode: types.ResetMode,
848
+ options?: types.TaskOptions<types.ResetOptions>,
849
+ callback?: types.SimpleGitTaskCallback<string>
850
+ ): Response<string>;
851
+
852
+ reset(mode: types.ResetMode, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
853
+
854
+ reset(
855
+ options?: types.TaskOptions<types.ResetOptions>,
856
+ callback?: types.SimpleGitTaskCallback<string>
857
+ ): Response<string>;
858
+
859
+ /**
860
+ * Revert one or more commits in the local working copy
861
+ *
862
+ * - commit The commit to revert. Can be any hash, offset (eg: `HEAD~2`) or range (eg: `master~5..master~2`)
863
+ */
864
+ revert(
865
+ commit: String,
866
+ options?: types.TaskOptions,
867
+ callback?: types.SimpleGitTaskCallback<void>
868
+ ): Response<void>;
869
+
870
+ revert(commit: String, callback?: types.SimpleGitTaskCallback<void>): Response<void>;
871
+
872
+ /**
873
+ * Passes the supplied options to `git rev-parse` and returns the string response. Options can be either a
874
+ * string array or `Options` object of options compatible with the [rev-parse](https://git-scm.com/docs/git-rev-parse)
875
+ *
876
+ * Example uses of `rev-parse` include converting friendly commit references (ie: branch names) to SHA1 hashes
877
+ * and retrieving meta details about the current repo (eg: the root directory, and whether it was created as
878
+ * a bare repo).
879
+ */
880
+ revparse(
881
+ option: string,
882
+ options?: types.TaskOptions,
883
+ callback?: types.SimpleGitTaskCallback<string>
884
+ ): Response<string>;
885
+
886
+ revparse(
887
+ options?: types.TaskOptions,
888
+ callback?: types.SimpleGitTaskCallback<string>
889
+ ): Response<string>;
890
+
891
+ /**
892
+ * Removes the named files from source control.
893
+ */
894
+ rm(paths: string | string[], callback?: types.SimpleGitTaskCallback<void>): Response<void>;
895
+
896
+ /**
897
+ * Removes the named files from source control but keeps them on disk rather than deleting them entirely. To
898
+ * completely remove the files, use `rm`.
899
+ */
900
+ rmKeepLocal(
901
+ paths: string | string[],
902
+ callback?: types.SimpleGitTaskCallback<void>
903
+ ): Response<void>;
904
+
905
+ /**
906
+ * Show various types of objects, for example the file at a certain commit
907
+ */
908
+ show(
909
+ option: string | types.TaskOptions,
910
+ callback?: types.SimpleGitTaskCallback<string>
911
+ ): Response<string>;
912
+
913
+ show(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
914
+
915
+ showBuffer(option: string | types.TaskOptions): Response<Buffer>;
916
+
917
+ /**
918
+ * @deprecated
919
+ *
920
+ * From version 2.7.0, use of `silent` is deprecated in favour of using the `debug` library, this method will
921
+ * be removed in version 3.x.
922
+ *
923
+ * Please see the [readme](https://github.com/steveukx/git-js/blob/master/readme.md#enable-logging) for more details.
924
+ *
925
+ * Disables/enables the use of the console for printing warnings and errors, by default messages are not shown in
926
+ * a production environment.
927
+ *
928
+ * @param {boolean} silence
929
+ */
930
+ silent(silence?: boolean): this;
931
+
932
+ /**
933
+ * List the stash(s) of the local repo
934
+ */
935
+ stashList(
936
+ options?: types.TaskOptions,
937
+ callback?: types.SimpleGitTaskCallback<resp.LogResult>
938
+ ): Response<resp.LogResult>;
939
+
940
+ stashList(callback?: types.SimpleGitTaskCallback<resp.LogResult>): Response<resp.LogResult>;
941
+
942
+ /**
943
+ * Call any `git submodule` function with arguments passed as an array of strings.
944
+ */
945
+ subModule(
946
+ options?: types.TaskOptions,
947
+ callback?: types.SimpleGitTaskCallback<string>
948
+ ): Response<string>;
949
+
950
+ /**
951
+ * Add a submodule
952
+ */
953
+ submoduleAdd(
954
+ repo: string,
955
+ path: string,
956
+ callback?: types.SimpleGitTaskCallback<string>
957
+ ): Response<string>;
958
+
959
+ /**
960
+ * Initialise submodules
961
+ */
962
+ submoduleInit(
963
+ moduleName: string,
964
+ options?: types.TaskOptions,
965
+ callback?: types.SimpleGitTaskCallback<string>
966
+ ): Response<string>;
967
+
968
+ submoduleInit(
969
+ moduleName: string,
970
+ callback?: types.SimpleGitTaskCallback<string>
971
+ ): Response<string>;
972
+
973
+ submoduleInit(
974
+ options?: types.TaskOptions,
975
+ callback?: types.SimpleGitTaskCallback<string>
976
+ ): Response<string>;
977
+
978
+ submoduleInit(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
979
+
980
+ /**
981
+ * Update submodules
982
+ */
983
+ submoduleUpdate(
984
+ moduleName: string,
985
+ options?: types.TaskOptions,
986
+ callback?: types.SimpleGitTaskCallback<string>
987
+ ): Response<string>;
988
+
989
+ submoduleUpdate(
990
+ moduleName: string,
991
+ callback?: types.SimpleGitTaskCallback<string>
992
+ ): Response<string>;
993
+
994
+ submoduleUpdate(
995
+ options?: types.TaskOptions,
996
+ callback?: types.SimpleGitTaskCallback<string>
997
+ ): Response<string>;
998
+
999
+ submoduleUpdate(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
1000
+
1001
+ /**
1002
+ * List all tags. When using git 2.7.0 or above, include an options object with `"--sort": "property-name"` to
1003
+ * sort the tags by that property instead of using the default semantic versioning sort.
1004
+ *
1005
+ * Note, supplying this option when it is not supported by your Git version will cause the operation to fail.
1006
+ */
1007
+ tag(
1008
+ options?: types.TaskOptions,
1009
+ callback?: types.SimpleGitTaskCallback<string>
1010
+ ): Response<string>;
1011
+
1012
+ /**
1013
+ * Gets a list of tagged versions.
1014
+ */
1015
+ tags(
1016
+ options?: types.TaskOptions,
1017
+ callback?: types.SimpleGitTaskCallback<resp.TagResult>
1018
+ ): Response<resp.TagResult>;
1019
+
1020
+ tags(callback?: types.SimpleGitTaskCallback<resp.TagResult>): Response<resp.TagResult>;
1021
+
1022
+ /**
1023
+ * Updates repository server info
1024
+ */
1025
+ updateServerInfo(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
1026
+
1027
+ /**
1028
+ * Retrieves `git` version information, including whether `git` is installed on the `PATH`
1029
+ */
1030
+ version(
1031
+ callback?: types.SimpleGitTaskCallback<types.VersionResult>
1032
+ ): Response<types.VersionResult>;
1033
+ }