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

Re: git cherry-pick with --no-verify option

From
YRYubin Ruan <ablacktshirt@gmail.com>
Date
Mar 15, 2022, 02:29 UTC
Message-ID
<CAJYFCiOMV6P=jDOJ-yM4d4wvkkziKmXWcnZjEdahENUAeeFocQ@mail.gmail.com>
In-Reply-To
<xmqqee34m8kz.fsf@gitster.g>
On Tue, Mar 15, 2022 at 7:13 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
>
> Yubin Ruan <ablacktshirt@gmail.com> writes:
>
> > Is there any version of Git that supports the cherry-pick command with
> > "--no-verify"?
> >
> > It is supported in "git commit" command but not in "git cherry-pick"
> > command, and I always have to move .git/hooks/pre-commit away to work
> > around this in case of "git cherry-pick".
>
<...>
Show 15 quoted lines
> Ahh, I think the user is fooled by a bad advice in the message.
> (all conflicts fixed: run "git cherry-pick --continue") is wrong and
> misleading advice added by those who did not think things through.
>
> After fixing all conflicts, run "git commit" to record it and then
> you run "git cherry-pick --continue" if there are more steps to
> cherry-pick (i.e. "git cherry-pick A..B").  "git commit" takes not
> just "--no-verify" but other options like "--reset-author" to let
> you take over authorship if the conflict resolution (actually,
> adjusting the original commit to the different context it is being
> cherry-picked to) is so involved that a change of authorship is
> warranted.  "cherry-pick --continue" does not have all the necessary
> flexibility and conceptually it is a separte operation (i.e. "please
> continue the stopped sequence" is what it means) from concluding the
> current step in the sequence.

Yes, in case of conflict when doing cherry-pick, "git commit" should be used to resolve conflict and then "git cherry-pick --continue" if necessary. The help message of "git status" in the middle of "git cherry-pick" is quite misleading.

Thanks~ Yubin

Previous: Junio C Hamano
Message 3 of 3 in “git cherry-pick with --no-verify option”
  1. Yubin RuanMar 14, 2022
  2. Junio C HamanoMar 14, 2022
  3. Yubin RuanMar 15, 2022

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.