From: Alex Riesen <raa.lkml@gmail.com>
To: Sergei Organov <osv@javad.com>
Cc: git@vger.kernel.org
Subject: Re: Newbie: report of first experience with git-rebase.
Date: Wed, 31 Oct 2007 22:25:23 +0100 [thread overview]
Message-ID: <20071031212523.GB4255@steel.home> (raw)
In-Reply-To: <87d4uv3wh1.fsf@osv.gnss.ru>
Sergei Organov, Wed, Oct 31, 2007 20:39:06 +0100:
> $ git rebase --continue
> You must edit all merge conflicts and then
> mark them as resolved using git add
>
> me> Nice helpful message, -- need to do git-add
>
> $ git add Documentation/core-tutorial.txt
> $ git rebase --continue
>
> Applying Use new syntax (-m option) for git-merge.
>
> No changes - did you forget to use 'git add'?
This "No changes" was meant as a hint
> When you have resolved this problem run "git rebase --continue".
> If you would prefer to skip this patch, instead run "git rebase --skip".
> To restore the original branch and stop rebasing run "git rebase --abort".
>
> me> What?! I just did the git-add! Moreover, before I did git-add, the
> me> error was different and helpful. Something went wrong?
Well, you edited you tree to look exactly like it already is.
> me> No luck :( A few seconds of thinking... Hmm... no-op patch, do I
> me> need to skip it? Let's try the --skip:
>
> $ git rebase --skip
Exactly.
> Applying Fix SYNOPSIS.
>
> error: patch failed: Documentation/git-merge.txt:10
> error: Documentation/git-merge.txt: patch does not apply
> Using index info to reconstruct a base tree...
> Falling back to patching base and 3-way merge...
> Auto-merged Documentation/git-merge.txt
> CONFLICT (content): Merge conflict in Documentation/git-merge.txt
> Failed to merge in the changes.
> Patch failed at 0003.
>
> When you have resolved this problem run "git rebase --continue".
> If you would prefer to skip this patch, instead run "git rebase --skip".
> To restore the original branch and stop rebasing run "git rebase --abort".
>
> me> Aha, that's it! But why git didn't just skip the no-op patch
> me> automatically? Well, anyway , now I have a new expected conflict,
it was not a noop patch before you resolved the conflict.
> me> and I'm sure I just want to skip this patch, so let's try exactly
> me> that:
>
> $ git rebase --skip
> Dirty index: cannot apply patches (dirty: Documentation/git-merge.txt)
Well... This one kind of hard: git-rebase _cannot_ know whether it is
safe to just drop all changes in the index and work tree (you could
have made the changes on purpose). It was decided not to drop
anything. You always can do
$ git reset --hard # kills all changes in index and work tree
$ git rebase --skip
(or maybe git-rebase is just too careful...)
> me> No luck :( Well, let's go the long way, -- edit conflicting
> me> Documentation/git-merge.txt (so that it matches upstream),
>
> $ git add Documentation/git-merge.txt
> $ git rebase --skip
> Nothing to do.
>
> me> Well, I already knew this will work, but why should I edit the file
> me> and then git-add it just to skip the patch? Is there better way?
> me> Anyway, the "Nothing to do." above is slightly confusing, -- did it
> me> actually skip the patch? So let's check the result:
Yes. It was the last commit. You were just too unlucky to hit all the
hard cases your first day.
prev parent reply other threads:[~2007-10-31 21:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-31 19:39 Newbie: report of first experience with git-rebase Sergei Organov
2007-10-31 19:57 ` Björn Steinbrink
2007-10-31 20:28 ` Sergei Organov
2007-10-31 21:12 ` Johannes Schindelin
2007-10-31 21:29 ` J. Bruce Fields
2007-10-31 22:06 ` Steven Grimm
2007-10-31 22:35 ` Daniel Barkalow
2007-10-31 22:38 ` J. Bruce Fields
2007-10-31 21:39 ` Junio C Hamano
2007-10-31 22:53 ` David Kastrup
2007-11-01 2:27 ` Nicolas Pitre
2007-11-01 12:13 ` Sergei Organov
2007-11-01 14:24 ` Johannes Schindelin
2007-11-01 15:10 ` J. Bruce Fields
2007-11-01 20:20 ` Junio C Hamano
2007-11-02 10:13 ` Andreas Ericsson
2007-11-02 19:11 ` Junio C Hamano
[not found] ` <472B77AC.5080507@midwinter.com>
2007-11-02 19:22 ` Andreas Ericsson
2007-10-31 22:49 ` David Kastrup
2007-10-31 21:25 ` Alex Riesen [this message]
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=20071031212523.GB4255@steel.home \
--to=raa.lkml@gmail.com \
--cc=git@vger.kernel.org \
--cc=osv@javad.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).