summaryrefslogtreecommitdiffstats
path: root/checkout-branch.sh
diff options
context:
space:
mode:
authorAndreas Eversberg2010-01-16 11:30:15 +0100
committerAndreas Eversberg2010-01-16 11:30:15 +0100
commit831c57a152b0c8eb5044971f454fb09501e4b4c1 (patch)
tree8a56256c03148e3c844a672951c1f1c3bdb31967 /checkout-branch.sh
parentHarald provided this patch to fix reload of interface.conf without segfault. (diff)
downloadlcr-831c57a152b0c8eb5044971f454fb09501e4b4c1.tar.gz
lcr-831c57a152b0c8eb5044971f454fb09501e4b4c1.tar.xz
lcr-831c57a152b0c8eb5044971f454fb09501e4b4c1.zip
new file: checkout-branch.sh
Diffstat (limited to 'checkout-branch.sh')
-rw-r--r--checkout-branch.sh14
1 files changed, 14 insertions, 0 deletions
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
+