Skip to content

Create empty branch on GitHub

Create empty branches with no prior history.

git switch --orphan <new branch>
git commit --allow-empty -m "Initial commit on orphan branch"
git push -u origin <new branch>

Last update: March 4, 2023