Skip to content

Instantly share code, notes, and snippets.

@zeqk
Forked from ummahusla/git-overwrite-branch.sh
Created December 30, 2019 21:28
Show Gist options
  • Save zeqk/69818c74376f4d755a05ebc3a914e5ed to your computer and use it in GitHub Desktop.
Save zeqk/69818c74376f4d755a05ebc3a914e5ed 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