Last active
August 7, 2019 18:34
-
-
Save RoyalSix/adbd78f8e879de04310030bd993bb6ce to your computer and use it in GitHub Desktop.
Created with Copy to Gist
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 reset --soft HEAD~1 | |
git log # make sure the last commit is reverted successfully as you expect. | |
$ git stash | |
$ git log # copy the last-commi-hash | |
$ git revert <last-commit-hash> | |
$ git push origin HEAD # note, no force push is needed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment