mirror of
https://github.com/cheat/cheat.git
synced 2025-09-06 20:12:55 +02:00
git: Undo parts of last commit
Added from: http://stackoverflow.com/a/4248269/2043048
This commit is contained in:
@ -121,3 +121,6 @@ git remote prune $(git remote | tr '\n' ' ')
|
|||||||
# Revisions can also be identified with :/text
|
# Revisions can also be identified with :/text
|
||||||
# So, this will show the first commit that has "cool" in their message body
|
# So, this will show the first commit that has "cool" in their message body
|
||||||
git show :/cool
|
git show :/cool
|
||||||
|
|
||||||
|
# Undo parts of last commit in a specific file
|
||||||
|
git checkout -p HEAD^ -- /path/to/file
|
||||||
|
Reference in New Issue
Block a user