What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2021-09-15 09:43:03
git revert only part of commit
Use the --no-commit (-n) option to git revert, then unstage the changes, then use git add --patch: $ git revert -n $bad_commit # Revert the commit, but don't commit the changes $ git reset HEAD . # Unstage the changes $ git add --patch . ... Add solution -
-
-
Shell/Bash 2021-08-29 10:45:02
git name repository
basename `git rev-parse --show-toplevel` Add solution -
-
Shell/Bash 2021-08-27 09:24:01
git check first commit
git rev-list --max-parents=0 HEAD Add solution
Best helpers
Ranking is empty