# how to add an empty initial commit

3 messages from 2009-08-30 to 2009-08-31. Participants: bill lam, Sean Estabrooks.
Thread: https://gitlist.dev/t/20785

## bill lam, 2009-08-30 00:52

Subject: how to add an empty initial commit
Message-ID: <20090830005224.GC10952@debian.b2j>
URL: https://gitlist.dev/e/20090830005224.GC10952%40debian.b2j

```
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.

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

```

## Sean Estabrooks, 2009-08-30 01:39

Subject: Re: how to add an empty initial commit
Message-ID: <BLU0-SMTP13B5A682834BA2E926F610AEF30@phx.gbl>
URL: https://gitlist.dev/e/BLU0-SMTP13B5A682834BA2E926F610AEF30%40phx.gbl
In-Reply-To: <20090830005224.GC10952@debian.b2j>

```
On Sun, 30 Aug 2009 08:52:24 +0800
bill lam <cbill.lam@gmail.com> 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

```

## bill lam, 2009-08-31 00:06

Subject: Re: how to add an empty initial commit
Message-ID: <20090831000622.GA3993@debian.b2j>
URL: https://gitlist.dev/e/20090831000622.GA3993%40debian.b2j
In-Reply-To: <BLU0-SMTP13B5A682834BA2E926F610AEF30@phx.gbl>

```
On Sat, 29 Aug 2009, Sean Estabrooks wrote:
> 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.

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

```
