Permalink
Browse files

Add script to create an empty git branch

  • Loading branch information...
1 parent 58ccfb1 commit 83e8979864846f206ea17064c198c50329fb91a2 @smtlaissezfaire committed Feb 25, 2010
Showing with 18 additions and 0 deletions.
  1. +18 −0 git-create-empty-branch
View
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+branch=$1
+
+function output_help {
+ echo ""
+ echo "usage: "
+ echo ""
+ echo " git-create-empty-branch ref"
+}
+
+if [[ $branch ]]; then
+ git symbolic-ref HEAD refs/heads/$branch
+ rm .git/index
+ git clean -fdx
+else
+ output_help
+fi

0 comments on commit 83e8979

Please sign in to comment.