Created
October 18, 2011 17:35
-
-
Save ceronman/1296066 to your computer and use it in GitHub Desktop.
Git new branch
This file contains hidden or 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 | |
| set -x -e | |
| # update master first | |
| git checkout master | |
| git pull upstream master | |
| git push origin master | |
| case $# in | |
| 1) BRANCH="$1";; | |
| *) echo "Usage: `basename $0` branchname" >&2; exit 1;; | |
| esac | |
| git branch $BRANCH | |
| git co $BRANCH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment