-
Notifications
You must be signed in to change notification settings - Fork 1k
/
Copy pathgit-commands.json
341 lines (341 loc) · 12.2 KB
/
git-commands.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
[
{
"title": "git init",
"description": "The git init command creates a new Git repository. It can be used to convert an existing, unversioned project to a Git repository or initialize a new, empty repository."
},
{
"title": "git clone",
"description": "The git clone command creates a working copy of a local repository."
},
{
"title": "git add",
"description": "The git add command adds a change in the working directory to the staging area. It tells Git that you want to include updates to a particular file in the next commit."
},
{
"title": "git commit",
"description": "The git commit command captures a snapshot of the project's currently staged changes."
},
{
"title": "git merge",
"description": "The git commit command joins two or more development histories together."
},
{
"title": "git log",
"description": "The git commit command provides a log of changes made throughout time."
},
{
"title": "git show",
"description": "The git commit command shows one or more objects (blobs, trees, tags and commits)."
},
{
"title": "git tag",
"description": "The git commit command provides Tags are ref's that point to specific points in git history. Tagging is generally used to capture a point in history that is used for a marked version release ."
},
{
"title": "git branch",
"description": "The git branch command is used to make a new branch. It can also be used to delete or list the existing branches of your repository."
},
{
"title": "git checkout",
"description": "The git checkout command is used to switch the working branch by pointing the HEAD to the branch you choose for."
},
{
"title": "git clone",
"description": "The git clone is used to make a clone or copy of the repo in a new directory,or at another location. The original repository can be located on the local filesystem or on remote."
},
{
"title": "git remote",
"description": "A remote in Git is a common repository that all team members use to exchange their changes. In most cases, it is stored on a code hosting service like GitHub or on an internal server."
},
{
"title": "git stash",
"description": "It is used to record the current state of the working directory and the index, but want to go back to a clean working directory, so it amends a dirty working directory."
},
{
"title": "git stash apply",
"description": "This command try to reapply the staged changes"
},
{
"title": "git stash pop",
"description": "This command applies the changes to the local workspace in the latest stash."
},
{
"title": "git stash drop",
"description": "This command remove a stash entry from the list of stash entries."
},
{
"title": "git stash list",
"description": "Enlists the stashes made with the recent one in the top."
},
{
"title": "git config",
"description": "This command sets the author name and email address respectively to be used with your commits."
},
{
"title": "git push –all [variable name]",
"description": "This command pushes all branches to your remote repository."
},
{
"title": "git push –all",
"description": "This command pushes all branches to your remote repository."
},
{
"title": "git pull",
"description": "This command lets you fetch changes from a remote repository and merge it into the current branch."
},
{
"title": "git diff",
"description": "This command shows how one branch (or even a specific revision) differs from another one."
},
{
"title": "git --version",
"description": "Prints the Git suite version that the git program came from."
},
{
"title": "git rm",
"description": "This command deletes the file from your working directory and stages the deletion."
},
{
"title": "git send-email",
"description": "This command sends a collection of patches as emails."
},
{
"title": "git push",
"description": "This command lets you push changes from your local repository to the remote repository."
},
{
"title": "git rebase",
"description": "This command moves or combines a sequence of commits to a new base commit"
},
{
"title": "git reset",
"description": "unstage a file while retaining the changes in working directory."
},
{
"title": "git reset --hard",
"description": "unstage all files while retaining the changes in working directory."
},
{
"title": "git status",
"description": "The git status command lists all new or modified files to be committed."
},
{
"title": "git clean",
"description": "Removes untracked files from the working tree"
},
{
"title": "git stash list",
"description": "Enlists the stashes made with the recent one in the top."
},
{
"title": "git cherry-pick",
"description": "Apply the changes introduced by some existing commits."
},
{
"title": "git show",
"description": "This command shows the metadata and content changes of the specified commit."
},
{
"title": "git rebase --abort",
"description": "This command is used to cancel an interactive rebase."
},
{
"title": "git cherry-pick",
"description": "This command copies the commit to the current branch."
},
{
"title": "git worktree list",
"description": "Manage multiple working trees attached to the same repository."
},
{
"title": "git shortlog",
"description": "Summarizes git log output in a format suitable for inclusion in release announcements. Each commit will be grouped by author and title."
},
{
"title": "git grep [pattern]",
"description": "This command print lines matching a pattern."
},
{
"title": "git reset hard",
"description": "Go back to the last commit."
},
{
"title": "git archive",
"description": "Create an archive of files from a named tree."
},
{
"title": "git cherry-pick [string]",
"description": "Merges a particular commit identified by [string] as a reference."
},
{
"title": "git bundle",
"description": "Move objects and refs by archive."
},
{
"title": "git fetch",
"description": "Downloads all history from the repository bookmark."
},
{
"title": "git merge",
"description": "Git merge will combine multiple sequences of commits into one unified history. In the most frequent use cases, git merge is used to combine two branches."
},
{
"title": "git fetch",
"description": "Fetch/download changes from a remote repository to the local repository without merging them with the current branch."
},
{
"title": "git status",
"description": "The git commit command provides a status of changes made throughout time."
},
{
"title": "git status",
"description": "The git status command shows the state of your working directory and helps you see all the files which are untracked by Git, staged or unstaged."
},
{
"title": "git diff",
"description": "This command shows the file differences which are not yet staged."
},
{
"title": "git mv",
"description": "Move or rename a file, a directory, or a symlink."
},
{
"title": "git log --oneline",
"description": "Provides a summary/log of changes made in the repository in oneline."
},
{
"title": "git --help",
"description": " provides us all the help we require."
},
{
"title": "git bisect",
"description": "Use a binary search algorithm to find the commit that introduced a defect."
},
{
"title": "git reflog",
"description": "This command manages the information recorded in the reflogs."
},
{
"title": "git fetch",
"description": "Gathers any commits from the target branch that do not exist in your current branch but does not merge them with your current branch."
},
{
"title": "git gc",
"description": "Cleanup unnecessary files and optimize the local repository."
},
{
"title": "git rev-parse",
"description": "Shows the hash of current commit you're on."
},
{
"title": "git switch",
"description": "Switch to branch."
},
{
"title": "git apply",
"description": "This command reads the supplied diff output and applies that patch to files."
},
{
"title": "git rebase -i HEAD~4",
"description": "Starts an editor for the last 4 commits in your terminal."
},
{
"title": "git --help",
"description": "To learn more about Git Commands in Detail."
},
{
"title": "git checkout -b new-branch",
"description": "creates a new branch called 'new-branch' and then switch to the newly created branch."
},
{
"title": "git log --summary",
"description": "Provide a more detailed description of changes occurred to the repository."
},
{
"title": "git commit --amend",
"description": "This command is a convenient way to modify the most recent commit. It can also be used to simply edit the previous commit message without changing its snapshot"
},
{
"title": "git config",
"description": "This command sets the author name and email address respectively to be used with your commits."
},
{
"title": "git commit --amend",
"description": "Change the message of the last commit."
},
{
"title": "git please",
"description": "This is an alias for command- $ git config --global alias.please 'push --force-with-lease' "
},
{
"title": "git checkout -b",
"description": "The git checkout command is used create a branch and s switch the working branch by pointing the HEAD to the branch you choose for."
},
{
"title": "git squash",
"description": "Squashing a commit means, to move the changes introduced in said commit into its parent so that you end up with one commit instead of two (or more)."
},
{
"title": "git log --graph",
"description": "This command can be used to show the commit log in graph format"
},
{
"title": "git config",
"description": "The git config command configures the author name and email address to be used with your commits."
},
{
"title": "git reflog",
"description": "This command allows you to list all the commands that were executed and then recover particular commits."
},
{
"title": "git fetch --all --prune",
"description": "Removes any remote-tracking references that no longer exist on the remote and fetches all remotes."
},
{
"title": "git log --graph",
"description": "This command gives you the graphed version of each branch within your repository."
},
{
"title": "git rm --cached [file]",
"description": "Removes the file from version control but preserves the file locally."
},
{
"title": "git log --follow [file]",
"description": "Lists version history for a file, including renames"
},
{
"title": "git cherry",
"description": "Let you check whether your branch changes are present in some other branch or not"
},
{
"title": "git show",
"description": "This command shows the metadata and content changes of the specified commit."
},
{ "title": "git remote",
"description": "This command is used to connect your local repository to the remote server."
},
{
"title": "git blame",
"description": "Show what revision and author last modified each line of a file"
},
{
"title": "git add .",
"description": "This git command adds all modified and new (untracked) files in the current directory and all subdirectories to the staging area (a.k.a. the index), thus preparing them to be included in the next git commit"
},
{
"title": "git clean -n",
"description": "Shows which files would be removed from working directory. Use the -f flag in place of the -n flag to execute the clean."
},
{
"title": "git stash",
"description": "It takes any changes to tracked files in your work tree and stashes them away for later use, leaving you with a clean work tree to start hacking on something else.."
},
{
"title": "git commit -m [message]",
"description": "This command to used to commit any changes to the local repository and the -m flag is used to provide a short description of the changes that are being committed."
},
{
"title": "git rev-list --count master",
"description": "count the number of commits on a branch"
}
]