Created
October 20, 2009 01:46
-
-
Save ghostbar/213924 to your computer and use it in GitHub Desktop.
creates a git empty branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# creating a git empty branch | |
# it takes as arg the name for the new branch | |
git-symbolic-ref HEAD refs/heads/$1 | |
rm .git/index | |
git clean -fdx | |
git commit --allow-empty -m "Initial empty branch commit" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment