mirror of
https://github.com/Erreur32/cheat.git
synced 2024-12-22 21:52:12 +01:00
Add revert in git cheat
This commit is contained in:
parent
31e442d7f9
commit
c8f0e6295b
1 changed files with 3 additions and 0 deletions
|
@ -142,3 +142,6 @@ git show :/cool
|
||||||
|
|
||||||
# Undo parts of last commit in a specific file
|
# Undo parts of last commit in a specific file
|
||||||
git checkout -p HEAD^ -- /path/to/file
|
git checkout -p HEAD^ -- /path/to/file
|
||||||
|
|
||||||
|
# Revert a commit and keep the history of the reverted change as a separate revert commit
|
||||||
|
git revert <commit SHA>
|
||||||
|
|
Loading…
Reference in a new issue