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

Re: How to find where a branch was taken from.

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Mar 21, 2008, 20:22 UTC
Message-ID
<alpine.LNX.1.00.0803211618150.19665@iabervon.org>
In-Reply-To
<37fcd2780803211303r1a247739na79e78c609565010@mail.gmail.com>
On Fri, 21 Mar 2008, Dmitry Potapov wrote:
Show 15 quoted lines
> On Fri, Mar 21, 2008 at 9:48 PM, Avery Pennarun <apenwarr@gmail.com> wrote:
> >
> >  "git show-branch" has logic very close to what we need here: if you
> >  give it the names of your current branch and its parent, it'll show
> >  you just the changes on both branches since the branchpoint.  But I
> >  don't really want to know about additional changes on the parent, only
> >  on the branch I'm working with, and I often prefer the output to be in
> >  git-log's (very flexible) format instead of git-show-branch.
> 
> I believe that
> 
>    git log parent-branch..local-branch
> 
> should give you exactly what you want, i.e. all changes on your local
> branch since it was copied from the parent branch.
Then you need to remember what the parent branch was. But:
  git log local-branch ^maybe-parent-1 ^maybe-parent-2 ...
should give you what you want.
	-Daniel
*This .sig left intentionally blank*
Previous: Dmitry PotapovNext: J. Bruce Fields
Message 8 of 12 in “How to find where a branch was taken from.”
  1. Paul GardinerMar 21, 2008
  2. Junio C HamanoMar 21, 2008
  3. Junio C HamanoMar 21, 2008
  4. Avery PennarunMar 21, 2008
  5. Charles BaileyMar 21, 2008
  6. Avery PennarunMar 21, 2008
  7. Dmitry PotapovMar 21, 2008
  8. Daniel BarkalowMar 21, 2008
  9. J. Bruce FieldsMar 21, 2008
  10. Paul GardinerMar 22, 2008
  11. Jeff KingMar 22, 2008
  12. Paul GardinerMar 22, 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.