Skip to content

Instantly share code, notes, and snippets.

@onurhuseyincantay
Forked from cwsaylor/syncm.sh
Created February 12, 2019 15:01
Show Gist options
  • Select an option

  • Save onurhuseyincantay/19ec36657e352617d852c54c5d912b01 to your computer and use it in GitHub Desktop.

Select an option

Save onurhuseyincantay/19ec36657e352617d852c54c5d912b01 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