Skip to content

Instantly share code, notes, and snippets.

@nicktoumpelis
Last active May 9, 2025 08:50
Show Gist options
  • Select an option

  • Save nicktoumpelis/9877404 to your computer and use it in GitHub Desktop.

Select an option

Save nicktoumpelis/9877404 to your computer and use it in GitHub Desktop.
Create an empty initial commit
git checkout --orphan temp_master
git rm -rf .
git commit --allow-empty -m 'Make initial root commit'
git rebase --onto temp_master --root master
git branch -D temp_master
@jlherren

Copy link
Copy Markdown

Note that if you have an empty repository (just after git init or after cloning an empty repository), then this will suffice:

git commit --allow-empty -m 'Empty initial commit'

@nicktoumpelis

Copy link
Copy Markdown
Author

@jherren πŸ‘

@gorskimarcin96

Copy link
Copy Markdown

Thank you :)

@nicktoumpelis

Copy link
Copy Markdown
Author

@gorskimarcin96 πŸ‘

@memark

memark commented Oct 7, 2022

Copy link
Copy Markdown

Nice!

@nechevskac

Copy link
Copy Markdown

Tnx πŸ‘

@jsfez

jsfez commented Sep 22, 2023

Copy link
Copy Markdown

thank you

@nicktoumpelis

Copy link
Copy Markdown
Author

Nice!

πŸ‘πŸΌ

@nicktoumpelis

Copy link
Copy Markdown
Author

Tnx πŸ‘

πŸ‘πŸΌ

@nicktoumpelis

Copy link
Copy Markdown
Author

thank you

πŸ‘πŸΌ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment