bugfix. eof
[socialgit.git] / bin / newbranch
blob5bbebff7f2001e3531790007c16c9b514be0281d
1 #!/bin/sh
2 # newbranch
4 if ( git branch|grep "[^ ]$1$" ); then
5 echo "This branch already exists locally."
6 exit -1
7 fi
9 if ( git branch -r |grep "[^ ]origin/$1$" ); then
10 echo "This branch already exists remotely."
11 exit -1
14 git branch $1
16 # Change to master, stashing any dirty working copy files
17 changebranch master
19 # Create the new branch, pull in any existing commits for it from the central server
20 git branch $1
22 changebranch $1
23 commitbranch