Skip to content

Instantly share code, notes, and snippets.

@gabrieljones
Last active March 18, 2025 15:02
Show Gist options
  • Save gabrieljones/ec21a7376c9f7a540823ef67a066fada to your computer and use it in GitHub Desktop.
Save gabrieljones/ec21a7376c9f7a540823ef67a066fada to your computer and use it in GitHub Desktop.
# GitHub does not let you push orphan branches. This is the next closest thing. (Null Commit, Empty Commit, Zero Commit)
git config user.name "_"
git config user.email ""
git switch --orphan empty-branch
GIT_AUTHOR_DATE="1970-01-01 00:00:00 +0000" GIT_COMMITTER_DATE="1970-01-01 00:00:00 +0000" git commit --allow-empty --allow-empty-message -m ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment