Re: How do I show only log messages for commits on a specific branch?
From: Santi Béjar <hidden>
Date: 2016-06-15 22:47:55
On Thu, Dec 17, 2009 at 12:26 AM, Miklos Vajna [off-list ref] wrote:
On Wed, Dec 16, 2009 at 11:05:52AM -0700, Elijah Newren [off-list ref] wrote:quoted
git log new@{30.years.ago}..new (You'll get a warning that 'new' hasn't existed for 30 years but it doesn't hurt anything)That's the same as "git log new", if I'm not mistaken. What Stefan wants to do is to let git log show the commits which are only in the "new" branch, but I don't think there is an out-of-the-box solution for that.
Not out-of-the-box but this does exactly what you said, print all
commits only reachable from the "new" branch:
git log new --not $(git for-each-ref --format='%(refname)'
'refs/heads/*' | grep -v refs/heads/new)
For the original question, I think what makes most sense in this case
is asking for the commits since the upstream branch. Some time ago
there was a discussion about a syntax for the tracking branch and
there was even a patch:
Subject: [PATCH v2] Introduce <branch>@{upstream} as shortcut to the
tracked branch
Date: 2009-09-10 15:25:57 GMT
http://news.gmane.org/find-root.php?message_id=%3calpine.DEB.1.00.0909101724520.8306%40pacific.mpi%2dcbg.de%3e
but it's not in git.git.
HTH,
Santi