mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-05 04:55:49 +02:00
git-reset: add page (#1088)
This commit is contained in:
parent
1d5fb3263c
commit
26700bf198
1 changed files with 11 additions and 0 deletions
11
pages/common/git-reset.md
Normal file
11
pages/common/git-reset.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# git reset
|
||||||
|
|
||||||
|
> Undo commits or unstage changes, by resetting the current git HEAD to the specified state.
|
||||||
|
|
||||||
|
- Undo last commit, keep the changes in the local filesystem:
|
||||||
|
|
||||||
|
`git reset HEAD~1`
|
||||||
|
|
||||||
|
- Undo last commit, permanently delete the changes, and discard staged changes:
|
||||||
|
|
||||||
|
`git reset --hard HEAD~1`
|
Loading…
Add table
Reference in a new issue