Skip to content

Instantly share code, notes, and snippets.

@rgbink
Created June 4, 2015 18:25
Show Gist options
  • Save rgbink/e08e969bc1e4045444c7 to your computer and use it in GitHub Desktop.
Save rgbink/e08e969bc1e4045444c7 to your computer and use it in GitHub Desktop.

Revisions

  1. rgbink created this gist Jun 4, 2015.
    4 changes: 4 additions & 0 deletions git_overwrite_branch
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    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