Created
March 18, 2015 21:24
-
-
Save bultas/3fcd11d8e5e31e93562d to your computer and use it in GitHub Desktop.
GIT - how to replace master branch with another branch
This file contains hidden or 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
http://stackoverflow.com/questions/2862590/how-to-replace-master-branch-in-git-entirely-from-another-branch | |
You should be able to use the "ours" merge strategy to overwrite master with AnotherBranch like this: | |
git checkout AnotherBranch | |
git merge -s ours master | |
git checkout master | |
git merge AnotherBranch | |
The result should be your master is now essentially AnotherBranch. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment