new file: checkout-branch.sh

This commit is contained in:
Andreas Eversberg 2010-01-16 11:30:15 +01:00
parent b0bd74e35e
commit fa7af7ab19
1 changed files with 14 additions and 0 deletions

14
checkout-branch.sh Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
#checks out the given branch
if [ "$1" = "" ] ; then
echo "please provide one of the branch names:"
git branch -a
exit
fi
git checkout -b $1 origin/$1
git config branch.$1.remote origin
git config branch.$1.merge refs/heads/$1