Created
May 14, 2015 21:27
-
-
Save brev/c67a509af263d45d61b8 to your computer and use it in GitHub Desktop.
Git overwrite branch with another 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
# overwrite master with contents of seotweaks branch (seotweaks > master) | |
git checkout seotweaks # source name | |
git merge -s ours master # target name | |
git checkout master # target name | |
git merge seotweaks # source name |
correction: git merge -s ours master --allow-unrelated-histories
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm unfamiliar with
-s ours
but was wondering if you're overwriting master with the contents of seotweaks branch, why does a merge into seotweaks occur first?