Skip to content

Instantly share code, notes, and snippets.

View infinitydon's full-sized avatar

Christopher Adigun infinitydon

  • United States
View GitHub Profile
@infinitydon
infinitydon / Git: Empty branch.md
Created May 12, 2024 17:52 — forked from blattmann/Git: Empty branch.md
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.