From fa7af7ab195346b11a0bb401050d7c06f4a3ffaa Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sat, 16 Jan 2010 11:30:15 +0100 Subject: [PATCH] new file: checkout-branch.sh --- checkout-branch.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 checkout-branch.sh diff --git a/checkout-branch.sh b/checkout-branch.sh new file mode 100644 index 0000000..cdb9ab4 --- /dev/null +++ b/checkout-branch.sh @@ -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 + -- 2.13.6