Skip to content

Instantly share code, notes, and snippets.

@nisrulz
Created July 12, 2022 12:08
Show Gist options
  • Save nisrulz/ef7f7f579583025deb8d0c4fc6ee50cd to your computer and use it in GitHub Desktop.
Save nisrulz/ef7f7f579583025deb8d0c4fc6ee50cd to your computer and use it in GitHub Desktop.
Create an empty branch and add an empty commit to it.
git switch --orphan <new branch>
git commit --allow-empty -m "Initial commit on orphan branch"
git push -u origin <new branch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment