Answers for "how to revert the last pushed commit in git"

3

revert last push to server

git reset --hard HEAD@{1}
git push -f
Posted by: Guest on September-21-2020
6

git undo pushed commit

git reset <previous label or sha1>
git commit -am "commit message"
git push -f <remote-name> <branch-name>  //  git push -f origin master
Posted by: Guest on March-06-2020
1

undo last commit pushed

git reset # commitId
# Exemple
git reset 5310517
Posted by: Guest on October-21-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language