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

Aborting cherry-pick

From
Piotr Krukowiecki <piotr.krukowiecki@gmail.com>
Date
Feb 16, 2011, 09:16 UTC
Message-ID
<AANLkTingcnvm6rLnWdweAKdeOWAVjh+F+6BMWzfJxhKi@mail.gmail.com>
Hi,

I'd like to suggest improving cherry-pick messages/documentation in case of conflicts.

Example of cherry-pick conflict:
   $ git cherry-pick  c64e8caa56fd76577bbaea37592f4a9df10ab1b8
   error: could not apply c64e8ca... <<commit message>>
   hint: after resolving the conflicts, mark the corrected paths
   hint: with 'git add <paths>' or 'git rm <paths>'
   $ git status
   # On branch master
   # Unmerged paths:
   #   (use "git reset HEAD <file>..." to unstage)
   #   (use "git add/rm <file>..." as appropriate to mark resolution)
   #
   #	both modified:      <<file>>
   #
   no changes added to commit (use "git add" and/or "git commit -a")
I see following possibilities:
1. add hint to cherry-pick how to abort merge, for example:
   hint: use 'git reset --merge ORIG_HEAD' to abort merge
2. add hint to status how to abort merge, for example:
   #   (use 'git reset --merge ORIG_HEAD' to abort merge)
3. add "--abort" to cherry-pick (same option as for git-merge)

The ORIG_HEAD is specified in man page example. There is also a possibility of omitting ORIG_HEAD in which case local changes are retained. Maybe this is a better suggesting for the user? Or maybe describe both cases somewhere and point user to this documentation in status/cherry-pick output?

git-cherry-pick uses word "cancel" in man page (in example) and git-merge uses word "abort" for (as I understand) the same action.

I would suggest using either same word for both cases, or using both words in both cases. Otherwise it's confusing if you read about "aborting" merges and when you want to abort cherry-pick you don't find it - because it's called "canceling".

What is your opinion on this?
-- 
Piotrek
Next: Jonathan Nieder
Message 1 of 5 in “Aborting cherry-pick”
  1. Piotr KrukowieckiFeb 16, 2011
  2. cherry-pick: when pick fails, explain how to cancelJonathan Nieder, Feb 18, 2011
  3. Piotr KrukowieckiFeb 18, 2011
  4. Documentation: cherry-pick does not set ORIG_HEADJonathan Nieder, Feb 18, 2011
  5. Piotr KrukowieckiFeb 19, 2011

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.