Skip to content

Instantly share code, notes, and snippets.

@odixon
Forked from ummahusla/git-overwrite-branch.sh
Created June 8, 2018 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odixon/ea6dc416276084dc55ef4b21c593ab65 to your computer and use it in GitHub Desktop.
Save odixon/ea6dc416276084dc55ef4b21c593ab65 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment