Created
January 11, 2017 20:03
-
-
Save grumpyshoe/548045ee22e937e40db1b266babd6e2f to your computer and use it in GitHub Desktop.
reset git to a previous branch
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
Example of how to reset a master branch to a specific commit (doen't matter which branch of) | |
git checkout master | |
git reset --hard <newBaseCommitId> | |
git push -f origin master | |
git merge <speceficCommitId> | |
git push origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment