Skip to content

Instantly share code, notes, and snippets.

@kisplab
Forked from ummahusla/git-overwrite-branch.sh
Created January 1, 2020 17:12
Show Gist options
  • Save kisplab/ff36e9f8ede9ef25a339979c3b52faf0 to your computer and use it in GitHub Desktop.
Save kisplab/ff36e9f8ede9ef25a339979c3b52faf0 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