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: README.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ Though there are 1000’s of articles about git, I have written this article is
88
88
# Undo the last commit.
89
89
$ git reset HEAD~1
90
90
91
-
8.### Remote synchronization from Repository(Repository <-- Remotr)
91
+
8.### Remote synchronization from Repository(Repository <-- Remote)
92
92
93
93
# Push the current branch to the Remote Repository.
94
94
$ git push origin [branch]
@@ -102,6 +102,7 @@ Though there are 1000’s of articles about git, I have written this article is
102
102
# Download all remote branches.
103
103
$ git fetch --all
104
104
105
+
105
106
10.### Workspace synchronization from Repository (Workspace <-- Repository)
106
107
107
108
# merge the specified branch to the current branch.
@@ -164,7 +165,7 @@ Though there are 1000’s of articles about git, I have written this article is
164
165
165
166
13.### Ignore files and folder
166
167
167
-
# Delete the files in the Workspace and put this deletion into the Index.
168
+
# Delete the files in the Workspace and put this deletion into the Staging.
168
169
$ git rm [file1][file2] ...
169
170
170
171
@@ -203,28 +204,28 @@ Though there are 1000’s of articles about git, I have written this article is
203
204
204
205
6.### Revoke
205
206
206
-
# Restore the specified file of the Index to the Workspace.
207
+
# Restore the specified file of the Staging to the Workspace.
207
208
$ git checkout [file]
208
209
209
-
# Restore the specified file of a certain commit to the Index and Workspace.
210
+
# Restore the specified file of a certain commit to the Staging and Workspace.
210
211
$ git checkout [commit] [file]
211
212
212
-
# Restore all the files in the Index to the Workspace.
213
+
# Restore all the files in the Staging to the Workspace.
213
214
$ git checkout .
214
215
215
-
# Reset the specified file in the Index, keeping consistent with the previous commit, but remaining the workspace unchanged.
216
+
# Reset the specified file in the Staging, keeping consistent with the previous commit, but remaining the workspace unchanged.
216
217
$ git reset [file]
217
218
218
-
# Reset the Index and workspace, keeping consistent with the last commit.
219
+
# Reset the Staging and workspace, keeping consistent with the last commit.
219
220
$ git reset --hard
220
221
221
-
# Reset the pointer of the current branch to pointing the specified commit while resetting the Index, but the workspace remains unchanged.
222
+
# Reset the pointer of the current branch to pointing the specified commit while resetting the Staging, but the workspace remains unchanged.
222
223
$ git reset [commit]
223
224
224
-
# Reset the HEAD of the current branch to the specified commit while resetting the Index and Workspace, keeping consistent with the specified commit.
225
+
# Reset the HEAD of the current branch to the specified commit while resetting the Staging and Workspace, keeping consistent with the specified commit.
225
226
$ git reset --hard [commit]
226
227
227
-
# Reset the current HEAD to the specified commit, remaining the Index and Workspace unchanged.
228
+
# Reset the current HEAD to the specified commit, remaining the Staging and Workspace unchanged.
228
229
$ git reset --keep [commit]
229
230
230
231
# Create a new commit to undo the specified commit.
0 commit comments