git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git rebase -i <first_commit_in_repository>

From
DSDirk Süsserott <newsletter@dirk.my1.cc>
Date
Oct 26, 2009, 20:28 UTC
Message-ID
<4AE60669.9080402@dirk.my1.cc>
In-Reply-To
<2b05065b0910261108g4a8448c8x295606a8d33612f5@mail.gmail.com>
Am 26.10.2009 19:08 schrieb eschvoca:
Show 12 quoted lines
> On Mon, Oct 26, 2009 at 1:25 PM, Erik Faye-Lund
> <kusmabite@googlemail.com> wrote:
>> On Mon, Oct 26, 2009 at 6:14 PM, eschvoca <eschvoca@gmail.com> wrote:
>>> Hi,
>>>
>>> Is there a way to rewrite history, including the first commit.  It
>>> seems that the first commit can not be modified with a rebase.
>> This question is answered in the FAQ:
>> http://git.or.cz/gitwiki/GitFaq#HowdoIedittherootcommit.3F
>>
> 
> Thanks Eric.  Hopefully someone will enhance rebase to handle the root commit.
Hi,

probably my approach could help you in the future: When I create a new repo (git init) I firstly create an initial commit with nothing else than an initial commit, i.e.:

$ git init $ echo "initial" > initial.commit $ git add initial.commit $ git commit -m "Initial commit"

and then secondly

$ git add . $ git commit -m "*REAL* initial commit"

Afterwards I have a repo with an initial commit that only contains one file (initial.commit) and the "real" initial commits thereafter. Maybe that's a solution for you.

Cheers,
     Dirk
Previous: eschvocaNext: Allan Caffee
Message 5 of 9 in “git rebase -i <first_commit_in_repository>”
  1. eschvocaOct 26, 2009
  2. Mike HommeyOct 26, 2009
  3. Erik Faye-LundOct 26, 2009
  4. eschvocaOct 26, 2009
  5. Dirk SüsserottOct 26, 2009
  6. Allan CaffeeOct 26, 2009
  7. Dirk SüsserottOct 28, 2009
  8. Johannes SchindelinOct 26, 2009
  9. eschvocaOct 27, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.