You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: downloads/github-git-cheat-sheet.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
Git is the open-source distributed version control system that facilitates GitHub activities on your laptop or desktop. This cheat sheet summarizes commonly used Git command line instructions for quick reference.
4
4
5
5
## Install git
6
-
GitHub provides desktop clients that include a graphical user interface for the most common repository actions and an automatically updating command line edition of Git for advanced scenarios.
6
+
GitHub provides desktop clients that include a graphical user interface for the most common repository actions and an automatically updating command line edition of Git for advanced scenarios.
7
7
8
8
### GitHub for Windows
9
9
http://windows.github.com
@@ -36,7 +36,7 @@ Enables helpful colorization of command line output
36
36
37
37
38
38
## Create repositories
39
-
Starts a new repository or obtain one from an existing URL
39
+
Start a new repository or obtain one from an existing URL
40
40
41
41
42
42
```$ git init [project-name]```
@@ -49,7 +49,7 @@ Creates a new local repository with the specified name
49
49
Downloads a project and its entire version history
50
50
51
51
## Make changes
52
-
Reviews edits and craft a commit transaction
52
+
Review edits and craft a commit transaction
53
53
54
54
55
55
```$ git status```
@@ -74,15 +74,15 @@ Shows file differences between staging and the last file version
74
74
75
75
```$ git reset [file]```
76
76
77
-
Unstages the file, but preserve its contents
77
+
Unstages the file, but preserves its contents
78
78
79
79
80
80
```$ git commit -m"[descriptive message]"```
81
81
82
82
Records file snapshots permanently in version history
83
83
84
84
## Group changes
85
-
Names a series of commits and combine completed efforts
85
+
Name a series of commits and combine completed efforts
86
86
87
87
88
88
```$ git branch```
@@ -97,7 +97,7 @@ Creates a new branch
97
97
98
98
```$ git checkout [branch-name]```
99
99
100
-
Switches to the specified branch and update working directory
100
+
Switches to the specified branch and updates working directory
101
101
102
102
103
103
```$ git merge [branch-name]```
@@ -111,25 +111,25 @@ Deletes the specified branch
111
111
112
112
113
113
## Refactor file names
114
-
Relocates and removes versioned files
114
+
Relocate and remove versioned files
115
115
116
116
117
117
```$ git rm [file]```
118
118
119
-
Deletes the file from the working directory and stage the deletion
119
+
Deletes the file from the working directory and stages the deletion
120
120
121
121
122
122
```$ git rm --cached [file]```
123
123
124
-
Removes from version control but preserve the file locally
124
+
Removes from version control but preserves the file locally
125
125
126
126
127
127
```$ git mv [file-original] [file-renamed]```
128
128
129
129
Changes the file name and prepare it for commit
130
130
131
-
## Supress tracking
132
-
Excludes temporary files and paths
131
+
## Suppress tracking
132
+
Exclude temporary files and paths
133
133
134
134
```
135
135
*.log
@@ -168,7 +168,7 @@ Lists all stashed changesets
168
168
Discards the most recently stashed changeset
169
169
170
170
## Review history
171
-
Browses and inspect the evolution of project files
171
+
Browse and inspect the evolution of project files
172
172
173
173
174
174
```$ git log```
@@ -191,7 +191,7 @@ Shows content differences between two branches
191
191
Outputs metadata and content changes of the specified commit
192
192
193
193
## Redo commits
194
-
Erases mistakes and craft replacement history
194
+
Erase mistakes and craft replacement history
195
195
196
196
197
197
```$ git reset [commit]```
@@ -204,7 +204,7 @@ Undoes all commits after [commit], preserving changes locally
204
204
Discards all history and changes back to the specified commit
205
205
206
206
## Synchronize changes
207
-
Registers a repository bookmark and exchange version history
207
+
Register a repository bookmark and exchange version history
208
208
209
209
210
210
```$ git fetch [bookmark]```
@@ -214,7 +214,7 @@ Downloads all history from the repository bookmark
214
214
215
215
```$ git merge [bookmark]/[branch]```
216
216
217
-
Combines bookmark’s branch into into current local branch
217
+
Combines bookmark’s branch into current local branch
218
218
219
219
220
220
```$ git push [alias] [branch]```
@@ -224,7 +224,7 @@ Uploads all local branch commits to GitHub
224
224
225
225
```$ git pull```
226
226
227
-
Synchronizes bookmark history and incorporate current branch changes
227
+
Synchronizes bookmark history and incorporates current branch changes
0 commit comments