Answers for "how to remove a commit from git after push"

11

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
2

git delete pushed commit

git reset --hard <last_working_commit_id>

git push --force
Posted by: Guest on September-03-2021
0

delete a pushed commit

# delete the last commit
$git reset –hard HEAD~
Posted by: Guest on October-20-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language