Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5339eac

Browse files
author
Saiful
committed
Revoke/Undo from Staging
1 parent e73f4fb commit 5339eac

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

‎README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,13 @@ Though there are 1000’s of articles about git, I have written this article is
174174
* [Thegeekstuff](https://www.thegeekstuff.com/2014/04/git-log/)
175175

176176

177-
### Revoke/Undo from Workspace
177+
### Discard changes from Workspace
178178

179179
# Restore the specified file of the Workspace.
180180
$ git checkout [file]
181181

182182
# Restore all the files of the Workspace.
183183
$ git checkout .
184-
185184

186185
### Undo Commit (Workspace <-- Staging <-- Repository )
187186

@@ -190,7 +189,12 @@ Though there are 1000’s of articles about git, I have written this article is
190189

191190
### Revoke/Undo from Staging (Workspace <-- Staging)
192191

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.
194198
$ git reset [file]
195199

196200
# Reset the Staging and workspace, keeping consistent with the last commit.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /