Last active
July 27, 2020 05:17
-
-
Save sketchbuch/ba201d8f953f4e586ff17db2d0747c34 to your computer and use it in GitHub Desktop.
GIT - Delete last commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Delete Last Commit | |
================== | |
# Remove last commit locally | |
git reset HEAD^ | |
# Push changes to remote which will remove the commit | |
git push origin +HEAD | |
Delete Last Commit From Remote Only | |
=================================== | |
git push origin +HEAD^:<name-of-your-branch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment