Skip to content

Instantly share code, notes, and snippets.

@agdemore
Forked from cwsaylor/syncm.sh
Created May 8, 2019 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agdemore/479058e63b394c964e19da14d2e856c6 to your computer and use it in GitHub Desktop.
Save agdemore/479058e63b394c964e19da14d2e856c6 to your computer and use it in GitHub Desktop.
Merge master into current branch
#!/bin/sh -x
CURRENT=`git branch | grep "*" | awk '{print $2}'`
git checkout master
git fetch
git merge origin/master
git checkout ${CURRENT}
git merge master ${CURRENT}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment