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