Skip to content

Instantly share code, notes, and snippets.

@brev
Created May 14, 2015 21:27
Show Gist options
  • Save brev/c67a509af263d45d61b8 to your computer and use it in GitHub Desktop.
Save brev/c67a509af263d45d61b8 to your computer and use it in GitHub Desktop.
Git overwrite branch with another branch
# 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
@smaier
Copy link

smaier commented Oct 10, 2016

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