git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: cherry-pick --no-commit does not work well with --continue in case of conflicts

From
Ilya Kantor <iliakan@gmail.com>
Date
May 6, 2018, 05:17 UTC
Message-ID
<CAFU8umjw-gz1UGHwiopHRJ-+v+KS2USqXV-9Qs0ieW8GaLpUsA@mail.gmail.com>
In-Reply-To
<xmqqd0y9sdei.fsf@gitster-ct.c.googlers.com>
Let's say master..feature has 2 commits: A and B.

Then `git cherry-pick -n master..feature` should pick-up A and then B into the working directory and the index.

If applying A leads to a conflict, then it stops on A, like here:
>>> git cherry-pick -n master..feature
>> error: could not apply 2c11f12... Run work

Then I add the fix to the index, and should be able to continue on (B is yet unpicked):

>>> git add .
>>> git cherry-pick --continue
>> error: your local changes would be overwritten by cherry-pick.
>> fatal: cherry-pick failed

Now it fails. Expected behavior: should continue with picking B.

P.S. I assume, `cherry-pick -n <commits>` is meant to merge given commits' changes into the current working directory and the index, without making new commits, for any given set of commits, hope that's right?

Then we should be able to --continue in case of a conflict without committing.
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “cherry-pick --no-commit does not work well with --continue in case of conflicts”
  1. Ilya KantorMay 5, 2018
  2. Junio C HamanoMay 6, 2018
  3. Ilya KantorMay 6, 2018
  4. Junio C HamanoMay 8, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.