Skip to content

Instantly share code, notes, and snippets.

@rgbink
Created June 4, 2015 18:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rgbink/e08e969bc1e4045444c7 to your computer and use it in GitHub Desktop.
Save rgbink/e08e969bc1e4045444c7 to your computer and use it in GitHub Desktop.
Completely Overwrite chosen git branch
git checkout desired_branch // put in the name of the branch you wish to KEEP
git merge -s ours branch_to_be_replaced // put in the name of the branch you want to OVERWRITE
git checkout branch_to_be_replaced // put in the name of the branch you want to OVERWRITE
git merge desired_branch // put in the name of the branch you wish to KEEP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment