9/26/2019 - 11:27 PM

Create orphan branch

Create a empty branch from a repo that already has a structure.

#First create the branch
git checkout --orphan <branch-name>

#Second remove all files
git rm -rf .

#Add files and commit that files (the orphan branch is not listed until first commit)
git add <file>
git commit

#Check branchs(all listed now)
git branch