Answers for "delete git commit after push"

12

git remove commit before push

# Removes latest commit from the stash, KEEPS changes
git reset --soft HEAD~

# Removes latest commit from the stash, DELETES changes
git reset --hard HEAD~
Posted by: Guest on November-27-2020
1

git delete last commit after push

git reset --hard HEAD~1
git push -f <remote> <branch>
Posted by: Guest on April-21-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language