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