Re: git add -p and unresolved conflicts
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 28, 2012, 23:05 UTC
- Message-ID
- <7vfwcss4vk.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <7vk424s52z.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 6 quoted lines
> There is a crucial step missing. After running "cherry-pick --no-commit", > you would eyeball the result, and typically edit the file. The conflict > may not be in the part of the file you are interested in picking, in which > case you may even leave that part as-is. And then, you would pick what > you want to apply to the index during per-hunk interactive patching > session.
Strictly speaking, you do not even have to edit the file. If the conflict does not overlap the part of the change you are interested in, a hypothetical version of "add -p" that is oblivious to merge conflicts (i.e. running "reset $path" before starting "add -p") could help you apply the changes the picked commit makes relative to its parents to your current state.