Sometimes I want to create empty branch for gh-pages or server-packages instead of branch from master, I will excute following command:

1
2
3
4
5
git checkout --orphan empty.branch.name
git rm --cached -r .
echo "init empty branch" > README.md
git add README.md
git commit -m "init empty branch"

Stackoverflow reference