Created
April 25, 2014 10:25
-
-
Save grahamgilchrist/11284766 to your computer and use it in GitHub Desktop.
Pull latest master and merge it to branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# usage: git-push-master branchname | |
# script to pull the latest master of current repo and merge it into the specified branch and push that branch back to the remote | |
set -x #echo on | |
BRANCHNAME=$1 | |
git checkout master | |
git pull | |
git checkout $BRANCHNAME | |
git merge master --no-edit | |
git push | |
git checkout master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment