@@ -174,14 +174,13 @@ Though there are 1000’s of articles about git, I have written this article is
174
174
* [ Thegeekstuff] ( https://www.thegeekstuff.com/2014/04/git-log/ )
175
175
176
176
177
- ### Revoke/Undo from Workspace
177
+ ### Discard changes from Workspace
178
178
179
179
# Restore the specified file of the Workspace.
180
180
$ git checkout [file]
181
181
182
182
# Restore all the files of the Workspace.
183
183
$ git checkout .
184
-
185
184
186
185
### Undo Commit (Workspace <-- Staging <-- Repository )
187
186
@@ -190,7 +189,12 @@ Though there are 1000’s of articles about git, I have written this article is
190
189
191
190
### Revoke/Undo from Staging (Workspace <-- Staging)
192
191
193
- # Reset the specified file in the Staging, keeping consistent with the previous commit, but remaining the workspace unchanged.
192
+ # Restore all files from the Staging to the Workspace.
193
+ # Remaining the workspace unchanged.
194
+ $ git reset
195
+
196
+ # Restore specified file from the Staging to the Workspace.
197
+ # Remaining the workspace unchanged.
194
198
$ git reset [file]
195
199
196
200
# Reset the Staging and workspace, keeping consistent with the last commit.
0 commit comments