Matthew LaFalce
Posted on January 17, 2022
To undo the last commit from a remote git repository, you can use the git reset command
.
First you can use the following command to undo the last commit locally.
git reset HEAD^
Then you are able to use the following command to force push the local commit which was reverted to the remote git repository.
git push origin +HEAD
π πͺ π
π©
Matthew LaFalce
Posted on January 17, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.