Skip to content

Instantly share code, notes, and snippets.

@nicktoumpelis
Last active July 3, 2024 18:28
Show Gist options
  • Save nicktoumpelis/9877404 to your computer and use it in GitHub Desktop.
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

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
Author

@jherren πŸ‘

@gorskimarcin96
Copy link

Thank you :)

@nicktoumpelis
Copy link
Author

@gorskimarcin96 πŸ‘

@memark
Copy link

memark commented Oct 7, 2022

Nice!

@nechevskac
Copy link

Tnx πŸ‘

@jsfez
Copy link

jsfez commented Sep 22, 2023

thank you

@nicktoumpelis
Copy link
Author

Nice!

πŸ‘πŸΌ

@nicktoumpelis
Copy link
Author

Tnx πŸ‘

πŸ‘πŸΌ

@nicktoumpelis
Copy link
Author

thank you

πŸ‘πŸΌ

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