Skip to content

Instantly share code, notes, and snippets.

@luigi
Created August 17, 2015 20:45
Show Gist options
  • Select an option

  • Save luigi/a28f14cbd0a937b6d018 to your computer and use it in GitHub Desktop.

Select an option

Save luigi/a28f14cbd0a937b6d018 to your computer and use it in GitHub Desktop.

Revisions

  1. luigi created this gist Aug 17, 2015.
    19 changes: 19 additions & 0 deletions merging-master.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@

    # Prereq: Current branch is the feature branch and all pending changes are committed locally

    # First pull down the changes from master
    $ git checkout master
    $ git pull

    # Then, go back to the feature branch and merge in master
    $ git checkout my-feature
    $ git merge master

    ## If there are merge conflicts, open up the files and resolve them
    $ git add .
    $ git commit -m "Merge in master"

    ## Push the feature branch to GitHub
    $ git push