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

Re: Questions about branches in git

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Jan 28, 2010, 23:00 UTC
Message-ID
<46a038f91001281500x5088206akb7390dec8839a169@mail.gmail.com>
In-Reply-To
<69b754db1001281044y39e52f77hcc8f83144776c78f@mail.gmail.com>

On Thu, Jan 28, 2010 at 7:44 PM, Mike Linck <mgl@absolute-performance.com> wrote:

> I've looked through as much documentation as I can find about git show
> and git log, and I've played around with git rebase to try to apply
> changes to multiple places, but I have not been able to find a way to
> display the commits relevant to a particular bug/topic branch.

I've done a similar job for quite a while, and kernel hackers need that all the time too. If the branches merge a lot, what you need to know is what patches are only on one side, and not on the other. Two things to the rescue:

 - the "3 dots" "..." separator. try with gitk and git log:
    git log mybranch...hisbranch
    git log hisbranch...mybranch
 - git am (which is part of the rebase machinery) does the same as the
"..." operator, but has additional tricks to try and spot commits that
have been cherry picked. So I would often export patches with git am
just to review what' s on one side.
hth,
m
-- 
 martin.langhoff@gmail.com
 martin@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
Previous: Peter KreftingNext: Junio C Hamano
Message 18 of 21 in “Questions about branches in git”
  1. Mike LinckJan 28, 2010
  2. Michael WittenJan 28, 2010
  3. Michael WittenJan 28, 2010
  4. Michael WittenJan 28, 2010
  5. Mike LinckJan 28, 2010
  6. Jens LehmannJan 28, 2010
  7. Mike LinckJan 28, 2010
  8. Heiko VoigtJan 28, 2010
  9. Nanako ShiraishiJan 29, 2010
  10. Junio C HamanoJan 29, 2010
  11. Nicolas PitreJan 28, 2010
  12. Eugene SajineJan 28, 2010
  13. David AguilarJan 28, 2010
  14. Michael WittenJan 28, 2010
  15. Mike LinckJan 28, 2010
  16. Michael WittenJan 28, 2010
  17. Peter KreftingJan 29, 2010
  18. Martin LanghoffJan 28, 2010
  19. Junio C HamanoJan 28, 2010
  20. Mike LinckJan 29, 2010
  21. Peter KreftingJan 29, 2010

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.