Re: How to reorder all commits include the initial commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 18, 2012 at 12:15 AM, 이응준 <semtlenori@xxxxxxxxx> wrote:
> Sometimes, I need to reorder all commits, which include the initial
> commit, in my branch.
> So I tried it using git-rebase as follows, but it failed with the fatal error.
>
> (supposing the initial commit is 793ea88)
> $ git rebase -i 793ea88^
> fatal: Needed a single revision
> invalid upstream 793ea88^
>
> How can I do that?

>From my reading of git-rebase(1), this is currently unsupported.
However, I was able to reorder linear history including the root using
git format-patch and git am.

  git init test
  cd test/
  echo a>b
  git add b
  git commit -m '1'
  echo c>d
  git add d
  git commit -m '2'
  git init new
  cd new/
  git am ../0002-2.patch
  git am ../0001-1.patch

--
David Barr
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]