From: "Santi Béjar" <santi@agolina.net>
To: Rustom Mody <rustompmody@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: how to reorder commits
Date: Mon, 20 Jul 2009 17:37:47 +0200 [thread overview]
Message-ID: <adf1fd3d0907200837k63f21504v3d660f9503962fcf@mail.gmail.com> (raw)
In-Reply-To: <f46c52560907200807heed4bbfkde15cccd2ae8151d@mail.gmail.com>
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^
But normally you reorder "changes", not trees.
HTH,
Santi
next prev parent reply other threads:[~2009-07-20 15:37 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 [this message]
2009-07-20 16:01 ` Rustom Mody
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=adf1fd3d0907200837k63f21504v3d660f9503962fcf@mail.gmail.com \
--to=santi@agolina.net \
--cc=git@vger.kernel.org \
--cc=rustompmody@gmail.com \
/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).