Permalink
Browse files

Document.

  • Loading branch information...
rstacruz committed May 31, 2012
1 parent ff98090 commit f5a960b54e63b0f7b2f6ff611426563284373d58
Showing with 21 additions and 1 deletion.
  1. +3 −0 bin/git-branch-checkout
  2. +7 −0 bin/git-branch-create
  3. +4 −0 bin/git-branch-delete
  4. +4 −1 bin/git-branch-list
  5. +3 −0 bin/git-branch-track
View
@@ -1,4 +1,7 @@
#!/bin/sh
+#
+# $ git branch-checkout BRANCH [REMOTE]
+#
# Checks out an existing remote branch.
branch=$1
View
@@ -1,6 +1,13 @@
#!/bin/sh
+#
+# $ git branch-create BRANCH [REMOTE]
+#
+# Creates a branch and sets up tracking on it's remote counterpart.
branch=$1
[ -z $branch ] && echo "Branch required." && exit 1
+remote=$2
+[ -z $remote ] && remote=origin
+
git checkout --track -b $branch $remote/$branch
View
@@ -1,4 +1,8 @@
#!/bin/sh
+#
+# $ git branch-delete BRANCH [REMOTE]
+#
+# Deletes a branch locally and remotely.
branch=$1
[ -z $branch ] && echo "Branch required." && exit 1
View
@@ -1,5 +1,8 @@
#!/bin/sh
-# Lists branch in a remote.
+#
+# $ git branch-list [REMOTE]
+#
+# Lists branches in a remote.
remote=$1
[ -z $remote ] && remote=origin
View
@@ -1,4 +1,7 @@
#!/bin/sh
+#
+# $ git branch-track [REMOTE]
+#
# Sets up tracking in a remote branch.
branch="$(git symbolic-ref HEAD 2>/dev/null)" || (echo "You're not in a branch"; exit 1)

0 comments on commit f5a960b

Please sign in to comment.