Created
December 2, 2010 20:55
-
-
Save chanian/726045 to your computer and use it in GitHub Desktop.
Painless feature branch creation for all!
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/sh | |
if [ ! -d ./.git ] | |
then | |
echo "Not a git repository" | |
exit | |
fi | |
if [ $# -ne 1 ] | |
then | |
echo "Please provide a branch name to create and switch to" | |
exit | |
fi | |
git checkout master && git pull && git push origin origin:refs/heads/$1 && git checkout --track -b $1 origin/$1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment