From: Andreas Ericsson <exon@op5.com>
To: John Dlugosz <JDlugosz@TradeStation.com>
Cc: git@vger.kernel.org
Subject: Re: problem with cherry picking
Date: Tue, 21 Apr 2009 00:20:41 +0200 [thread overview]
Message-ID: <49ECF539.3030701@op5.com> (raw)
In-Reply-To: <450196A1AAAE4B42A00A8B27A59278E70ACE0021@EXCHANGE.trad.tradestation.com>
John Dlugosz wrote:
> Someone at work here jumped the gun and committed something before
> fetching an amended branch. Typical stuff -- now his work and the
> repo's work diverged. His change was purely new files, no big deal. In
> gitk, reset his dev to origin/remote/dev, then cherry-pick his new
> commit.
>
> But it barfed all over the place. One problem was read-only files. But
> even after purging those, it had the same complaint, something about
> untracked file would be modified. What's the deal here?
>
> I talked him through accomplishing it another way -- reset hard back to
> his new commit, reset mixed to the proper ancestor, and re-doing the
> commit.
>
> But I want to understand what the issue is here.
>
When he first reset back to the pre-modified state, the newly created
files were not removed from the working directory (this happens on soft
or mixed resets, fe, or when a branch is moved).
The files were untracked by git as seen from the commit he reset to, and
so git rightly refuses to apply another patch that introduces them, as
that would mean overwriting files git knew nothing about (again, at the
time of the commit he reset back to).
/Andreas
prev parent reply other threads:[~2009-04-20 22:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-20 20:07 problem with cherry picking John Dlugosz
2009-04-20 22:20 ` Andreas Ericsson [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=49ECF539.3030701@op5.com \
--to=exon@op5.com \
--cc=JDlugosz@TradeStation.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).