* problem with cherry picking
@ 2009-04-20 20:07 John Dlugosz
2009-04-20 22:20 ` Andreas Ericsson
0 siblings, 1 reply; 2+ messages in thread
From: John Dlugosz @ 2009-04-20 20:07 UTC (permalink / raw)
To: git
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.
--John
TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited.
If you received this in error, please contact the sender and delete the material from any computer.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: problem with cherry picking
2009-04-20 20:07 problem with cherry picking John Dlugosz
@ 2009-04-20 22:20 ` Andreas Ericsson
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Ericsson @ 2009-04-20 22:20 UTC (permalink / raw)
To: John Dlugosz; +Cc: git
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-20 22:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-20 20:07 problem with cherry picking John Dlugosz
2009-04-20 22:20 ` Andreas Ericsson
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).