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

Re: How to reorder all commits include the initial commit

From
Yi, EungJun <semtlenori@gmail.com>
Date
Mar 18, 2012, 19:05 UTC
Message-ID
<CAFT+Tg8=dkFLh_=2pMYH6McZTWr2NjxZHztVG7WcxGMEBmdOwA@mail.gmail.com>
In-Reply-To
<CANYiYbGbJxZPOAN9twBPZoD318eA_CLcsVzcFuoHrc32+e96FQ@mail.gmail.com>
2012년 3월 18일 오전 11:58, Jiang Xin <worldhello.net@gmail.com>님의 말:
Show 8 quoted lines
>> $ git checkout -b test --orphan
>
> option -b and --orphan can not be used together.
>
>> $ git format-patch <newroot>^..<newroot> | git am
>
> can not apply patch when there is no root commit
>
You are all right. I made several mistakes including what you point out.
I fixed them as follows:

$ git checkout --orphan test $ git rm '*' -f $ git show <newroot> | git apply - --index $ git commit --reuse-message <newroot> $ git rebase --onto test --root master $ git branch -d test

Previous: Jiang Xin
Message 6 of 6 in “How to reorder all commits include the initial commit”
  1. 이응준Mar 17, 2012
  2. David BarrMar 17, 2012
  3. Jakub NarebskiMar 17, 2012
  4. Yi, EungJunMar 17, 2012
  5. Jiang XinMar 18, 2012
  6. Yi, EungJunMar 18, 2012

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.