Created
January 7, 2013 14:30
-
-
Save reterVision/4475381 to your computer and use it in GitHub Desktop.
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
# Sometimes we could mistakenly commit something without pull first, so | |
# here is how we revert this process and keep our master branch clean. | |
# Reset back to the commit before you last commit. | |
# git reset --mixed will keep your changes and revert other files back | |
# to that commit. | |
git pull | |
git reset --mixed HEAD-before-your-last-commit | |
# Commit your changes again. | |
git add . | |
git commit -m "Your newest commit message" | |
# Push to origin then all settled. | |
git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment