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

Re: git blame and cherry-picking

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 7, 2008, 18:49 UTC
Message-ID
<7vsktgirto.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<AA6BDC98-8800-4031-8C8F-A4BD326BEC1E@midwinter.com>
Steven Grimm <koreth@midwinter.com> writes:
Show 9 quoted lines
> On Aug 7, 2008, at 11:22 AM, Jeff King wrote:
>> You could potentially have git-blame incorporate that information
>> (again, if the referenced commit is even still available), but I'm not
>> sure exactly what difference it would make. I don't think you would
>> want
>> to start blaming up the original commits line of parentage.
>
> No, of course not. But one might want to show the original commit's
> author instead of the name of the person who did the cherry pick.

"cherry-pick" lets you say "-n" so that you can use the change as if you are creating (think of it as a typesaver). You can ask commit to record the result under the original authorship.

Perhaps a workflow sequence would go like this:
    ... Ah, I like that change by Joe; let's see if that really works ...
    $ git cherry-pick -n joe/experimental~4
    $ test test test
    ... Hmm, not quite, let's fix up ...
    $ edit test edit test
    ... Now it works and I like the result, but I'll edit the comment to
    ... describe the change I made on top of what he did to make it work.
    $ git commit -a -c joe/experimental~4
Previous: Steven GrimmNext: Jeff King
Message 5 of 7 in “git blame and cherry-picking”
  1. Steven GrimmAug 6, 2008
  2. Alex RiesenAug 7, 2008
  3. Jeff KingAug 7, 2008
  4. Steven GrimmAug 7, 2008
  5. Junio C HamanoAug 7, 2008
  6. Jeff KingAug 7, 2008
  7. Avery PennarunAug 7, 2008

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.