Last active
January 1, 2016 07:49
-
-
Save youngshook/8114222 to your computer and use it in GitHub Desktop.
Create a new orphan branch, use three ways. A orphan branch like Github Pages(create a gh-pages 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
#1. Hack ./git/HEAD file | |
echo ref: refs/heads/orphan_branch_name | |
git rm -rf . | |
# .............. # add file ... commit file ... | |
#2.Use --orphan parameter | |
git checkout --orphan orphan_branch_name | |
git rm -rf . | |
# .............. # add file ... commit file ... | |
#3.Use git symbolic-ref command | |
git symbolic-ref HEAD refs/heads/orphan_branch_name | |
rm .git/index | |
# .............. # add file ... commit file ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment