Last active
January 24, 2020 18:30
-
-
Save samredai/2c22724175d06af94f7274f4abd740ab to your computer and use it in GitHub Desktop.
Git: Remove the latest commit in GitHub
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
git push -f origin HEAD^:master | |
# Note that you if you just want to remove a commit locally and... | |
# ...keep the change as uncommited modifications to the local files, use the line below: | |
git reset --soft HEAD~1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment