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 a622190

Browse files
author
Saiful
committed
readme changes
1 parent 5c63648 commit a622190

File tree

1 file changed

+9
-33
lines changed

1 file changed

+9
-33
lines changed

‎README.md

Lines changed: 9 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -193,50 +193,26 @@ Though there are 1000’s of articles about git, I have written this article is
193193
$ git reset
194194

195195
# Restore all files from the Staging to the Workspace.
196-
# All chnages pf the workspace will be discard.
196+
# All chnages of the workspace will be discard.
197197
$ git reset --hard
198198

199-
# Reset the pointer of the current branch to pointing the specified commit while resetting the Staging, but the workspace remains unchanged.
200-
$ git reset [commit]
201-
202-
# Reset the HEAD of the current branch to the specified commit while resetting the Staging and Workspace, keeping consistent with the specified commit.
203-
$ git reset --hard [commit]
204-
205-
# Reset the current HEAD to the specified commit, remaining the Staging and Workspace unchanged.
206-
$ git reset --keep [commit]
207-
208-
# Create a new commit to undo the specified commit.
209-
# All changes of the latter will be offset by the former and applied to the current branch.
210-
$ git revert [commit]
211-
212-
# Remove the uncommitted changes temporarily and move them in later.
213-
$ git stash
214-
$ git stash pop
215-
216-
217199
### Revoke/Undo from Staging (Workspace <-- Staging <-- Repository)
218200

219201
# Restore all files from the Repository to the Workspace.
220202
# Remaining the workspace unchanged.
221203
# Undo the last commit.
222-
# Removig arbitary/specific commit is not possible using reset
223204
$ git reset HEAD~1
205+
$ git reset --medium HEAD~1
224206

225-
# Restore specified file from the Staging to the Workspace.
207+
# Restore all files from the Repository to the Staging.
226208
# Remaining the workspace unchanged.
227-
$ git reset [file]
228-
229-
# Reset the Staging and workspace, keeping consistent with the last commit.
230-
$ git reset --hard
231-
232-
# Reset the pointer of the current branch to pointing the specified commit while resetting the Staging, but the workspace remains unchanged.
233-
$ git reset [commit]
234-
235-
# Reset the HEAD of the current branch to the specified commit while resetting the Staging and Workspace, keeping consistent with the specified commit.
236-
$ git reset --hard [commit]
209+
# Undo the last commit.
210+
$ git reset --soft HEAD~1
237211

238-
# Reset the current HEAD to the specified commit, remaining the Staging and Workspace unchanged.
239-
$ git reset --keep [commit]
212+
# Restore all files from the Repository to the Workspace.
213+
# Undo the last commit.
214+
# All chnages of the workspace will be discard.
215+
$ git reset --hard HEAD~1
240216

241217
# Create a new commit to undo the specified commit.
242218
# All changes of the latter will be offset by the former and applied to the current branch.

0 commit comments

Comments
(0)

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