Skip to contentSkip to conversation

how to add an empty initial commit

DISCUSSION bill lam 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore

bill lam

author
#0 lore raw

I want to insert an empty initial commit so that I can rebase and edit files in the real initial commit. There is a --root option in git-rebase but I can not find example of how to use it.

I googled some said it needs to create a new branch, I tried but it failed to merge.

Signature · 4 lines
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
#1 lore raw
Quoted 3 lines · On Sun, 30 Aug 2009 08:52:24 +0800 bill lam <[email protected]> wrote:

I want to insert an empty initial commit so that I can rebase and edit files in the real initial commit. There is a --root option in git-rebase but I can not find example of how to use it.

Bill,

This sounds like a hard way to go about things. Instead, you can edit the files as you wish, "git add" the new edits, and then use
"git commit --amend" to alter the initial commit. Don't think rebase
would help in the situation you describe.

Sean

author
#2 lore raw
Quoted 4 lines · Sean Estabrooks

This sounds like a hard way to go about things. Instead, you can edit the files as you wish, "git add" the new edits, and then use
"git commit --amend" to alter the initial commit. Don't think rebase
would help in the situation you describe.

Sean,

Yes, you are correct. git-rebase does not help much. It has to initialise another empty git repo and copy all commits to there.

Signature · 4 lines
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3