Created
June 29, 2012 18:02
-
-
Save giuliandrimba/3019661 to your computer and use it in GitHub Desktop.
GIT: Create 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
git symbolic-ref HEAD refs/heads/empty | |
touch .gitignore | |
git add .gitignore | |
git commit -m 'Initial headless branch commit' |
The --orphan
option should work for most people (it was introduced by 1.7.2 in 2010). Documentation is here
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
git checkout --orphan is not available in older git versions