From: Rustom Mody <rustompmody@gmail.com>
To: git@vger.kernel.org
Subject: Re: how to reorder commits
Date: Mon, 20 Jul 2009 21:31:34 +0530 [thread overview]
Message-ID: <f46c52560907200901w67edbbdcpe405f28d98953354@mail.gmail.com> (raw)
In-Reply-To: <adf1fd3d0907200837k63f21504v3d660f9503962fcf@mail.gmail.com>
On Mon, Jul 20, 2009 at 9:07 PM, Santi Béjar<santi@agolina.net> wrote:
> 2009/7/20 Rustom Mody <rustompmody@gmail.com>:
>> I have a sequence of commits. I tried to reorder the top two in this way.
>> $ git rebase -i HEAD^^
>>
>> flip the two pick lines and exit vi
>>
>> I find my file full of conflict markers.
>
> "git rebase" applies the changes between the commit and the parent,
> and if the changes have conflicts this is what you get.
>
>> So what is the way of doing:
>> HEAD becomes current HEAD^
>> HEAD^ becomes current HEAD
>
> $ git branch old
> $ git reset --hard HEAD~2
> $ git read-tree old
> $ git commit -C old
> $ git read-tree old^
> $ git commit -C old^
Beautiful -- plumbing is nifty!
>
> But normally you reorder "changes", not trees.
Which may not always be conflict-free?
next prev parent reply other threads:[~2009-07-20 16:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-20 15:07 how to reorder commits Rustom Mody
2009-07-20 15:37 ` Santi Béjar
2009-07-20 16:01 ` Rustom Mody [this message]
2009-07-20 16:16 ` Santi Béjar
[not found] ` <873a8r132o.fsf@krank.kagedal.org>
2009-07-21 7:53 ` Rustom Mody
2009-07-20 21:27 ` Daniel Barkalow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f46c52560907200901w67edbbdcpe405f28d98953354@mail.gmail.com \
--to=rustompmody@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).