Created
July 28, 2015 02:01
-
-
Save rgsingh/a2c3232c0735928905ed to your computer and use it in GitHub Desktop.
Remove a git commit and re-push corrections
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
// If a push to the remote origin was already done then do the following | |
1. git stash // in same directory as previous commit | |
2. git reset --hard HEAD~1 // reset to the commit before last | |
3. git stash apply | |
4. Build if necessary and test | |
5. Commit whatever is needed | |
6. git push origin HEAD --force | |
7. Done | |
8. Have cake |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment