Skip to content

Instantly share code, notes, and snippets.

@cr3a7ure
Forked from cwsaylor/syncm.sh
Created July 15, 2019 13:45
Show Gist options
  • Save cr3a7ure/a6b7bb5ce33590bdfefb79afbdd59ad8 to your computer and use it in GitHub Desktop.
Save cr3a7ure/a6b7bb5ce33590bdfefb79afbdd59ad8 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