7583ce607030d28990a1e52f7ea8c613fe87291a
[git-central.git] / scripts / push
1 #!/bin/sh
2
3 branch_name=$(git symbolic-ref --quiet HEAD)
4 if [[ $? -ne 0 ]] ; then
5         echo "Not on a branch"
6         exit 1
7 fi
8
9 branch_name=${branch_name/refs\/heads\//}
10
11 git push origin $branch_name
12 if [[ $? -ne 0 ]] ; then
13         exit $?
14 fi
15
16 # ...tags...
17