Created
April 27, 2016 14:38
-
-
Save yblee85/c9eaac2e360e4541e6c5cc7ac2e0e524 to your computer and use it in GitHub Desktop.
Git (replace master with a 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
// sometimes accidently you switched to a branch and working on it | |
// and forgot to merge with master for a long long time | |
// now it would be really difficult to merge with master | |
// this will basically replace master with a branch | |
// say, you have a master and a branch named "branch1" | |
git checkout branch1 | |
git merge -s ours master | |
git checkout master | |
git merge branch1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment