Skip to content

Instantly share code, notes, and snippets.

View infinitydon's full-sized avatar

Christopher Adigun infinitydon

  • United States
View GitHub Profile
@blattmann
blattmann / Git: Empty branch.md
Last active May 27, 2024 14:31
Git: Create empty branch

Replace empty-branch with your desired branch name.

git checkout --orphan empty-branch

Then you can remove all the files you'll have in the staging area (so that they don't get committed):

git rm -rf .

At this point you have an empty branch, on your machine.