Dont force the push
[socialgit.git] / commitbranch
blobf9d93a6f08f11e0332557b6527c6efcc662c59a1
1 #!/bin/sh
2 # commitbranch
4 CURBRANCH=`currentbranchname`
5 git commit -a
6 updatebranch
7 if ( git status|grep ".dotest/" ); then
8 echo "Need to resolve update conflicts before commiting to the central repository."
9 exit -1
10 else
11 if ( test $CURBRANCH != "master" ); then
12 changebranch master
13 updatebranch
14 changebranch $CURBRANCH
15 git merge master
16 if ( git merge master|"You are in the middle of a conflicted merge." ); then
17 echo "Need to resolve conflicts from merging in master changes before continuing with commit."
18 exit -1
21 git push origin $CURBRANCH
22 git fetch