Thread (10 messages) flat view 10 messages, 8 authors, 2016-06-15

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

From: J. Bruce Fields <hidden>
Date: 2016-06-15 22:44:24

On Fri, Mar 21, 2008 at 04:22:11PM -0400, Daniel Barkalow wrote:
On Fri, 21 Mar 2008, Dmitry Potapov wrote:
quoted
On Fri, Mar 21, 2008 at 9:48 PM, Avery Pennarun [off-list ref] wrote:
quoted
 "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.
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#showing-commits-unique-to-a-branch

also has a couple amusing examples along these lines.

--b.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help