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

Git blame only current branch

From
SBStephen Bash <bash@genarts.com>
Date
Dec 12, 2011, 15:24 UTC
Message-ID
<d615954f-bed8-482d-a2e3-e1e741d6dd23@mail>
In-Reply-To
<e9e35956-a091-4143-8fd4-3516b54263a6@mail>
Hi all-
I'm curious if there's a method to make git blame merge commits that introduce code to the given branch rather than commits on the original (topic) branch?  For example:
  A--B--C---M--D  master
   \       /
    1--2--3       topicA
I'd like a mode where 'git blame master ...' shows commit M for lines changed by topicA so I can easily do 'git blame M^ ...' to see changes (on master) prior to the merge of topicA.  Unfortunately 'git blame master ^topicA ...' blames all the changes of topicA to 3 (which reading the docs appears to be the "correct" behavior).
Thanks!
Stephen
Next: Jeff King
Message 1 of 10 in “Git blame only current branch”
  1. Stephen BashDec 12, 2011
  2. Jeff KingDec 12, 2011
  3. Stephen BashDec 12, 2011
  4. andreas.t.auer_gtml_37453@ursus.ath.cxDec 12, 2011
  5. Vijay LakshminarayananDec 13, 2011
  6. Jeff KingDec 13, 2011
  7. Junio C HamanoDec 13, 2011
  8. Vijay LakshminarayananDec 13, 2011
  9. Frans KlaverDec 13, 2011
  10. Junio C HamanoDec 13, 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.