blog

Creating empty branch in GitHub repo

commit_id=$(git commit-tree -m 'Distribution branch' 4b825dc642cb6eb9a060e54bf8d69288fbee4904)
git push origin ${commit_id}:refs/heads/dist

Link: https://www.edwardthomson.com/blog/pushing_an_empty_branch.html

Creates empty branch on GitHub without the need for running --orphan and deleting all files locally.