Skip to content

Instantly share code, notes, and snippets.

@skyjia
Forked from ummahusla/git-overwrite-branch.sh
Created July 21, 2021 08:10
Show Gist options
  • Save skyjia/cd1ec93d4bb692f1035eaeaedfaa5cf7 to your computer and use it in GitHub Desktop.
Save skyjia/cd1ec93d4bb692f1035eaeaedfaa5cf7 to your computer and use it in GitHub Desktop.

Revisions

  1. Edvins Antonovs revised this gist Mar 10, 2020. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions git-overwrite-branch.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    # overwrite master with contents of seotweaks branch (seotweaks > master)
    git checkout seotweaks # source name
    # overwrite master with contents of feature branch (feature > master)
    git checkout feature # source name
    git merge -s ours master # target name
    git checkout master # target name
    git merge seotweaks # source name
    git merge feature # source name
  2. @brev brev renamed this gist May 14, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. @brev brev created this gist May 14, 2015.
    5 changes: 5 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    # 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