How to create a new empty branch
Create a new empty branch named “your-new-branch”, clean up, add .gitignore and commit.
git symbolic-ref HEAD refs/heads/your-new-branch
rm .git/index
git clean -fdx
touch .gitignore
git add .gitignore
git commit -m 'Initial commit'