Answers for "undo last remote commit git"

6

remove last commit from remote

git reset HEAD^ # remove commit locally
git push origin +HEAD # force-push the new HEAD commit
Posted by: Guest on March-19-2020
0

delete last commit from remote repo

git reset HEAD^ --hard
git push <<remote>> -f
Posted by: Guest on December-07-2021
0

remove last commit from remote

git push origin +HEAD^:<name of your branch, most likely 'master'>
Posted by: Guest on October-25-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language