Created
February 9, 2012 16:20
-
-
Save philtr/1780887 to your computer and use it in GitHub Desktop.
Shell function for creating a new empty branch
This file contains hidden or 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
# Add this to your .zshrc or .bash_profile | |
# Usage: gneb BRANCH_NAME | |
# | |
function gneb { | |
git symbolic-ref HEAD refs/heads/$1 | |
rm .git/index | |
git clean -fdx | |
touch README.md | |
git add README.md | |
git commit -m 'Initial commit' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment