how to show log for only one branch
- From
- Liu Yubao <yubao.liu@gmail.com>
- Date
- Nov 6, 2006, 03:41 UTC
- Message-ID
- <454EAEDB.8020909@gmail.com>
I'm some confused by `git log', here is a revision graph:
a-----> b ---> c ----------------> f ---> g --- master
\ /
`------> d ----------> e ---- testI hope `git log ...` shows g, f, c, b, a.
`git log master` shows g, f, e, d, c, b, a; `git log master ^test` shows g, f, c. `git log --no-merges master` shows g, e, d, c, b, a.
That's to say, I want to view master, master~1, master~2, master~3, ... until the beginning, no commits in other branches involved.
I have heard git treats all parents equally in a merge operation, so I am curious how git decides which parent is HEAD^1.
I feel the HEAD^1 branch is more special than HEAD^2 branch, because HEAD^1 is usually the working branch and the target branch of merging operation. it's a little more convenient to see only commits that really happen in current branch, especially for people who come from CVS and Subversion (yes, I think git is more interesting than CVS and Subversion:-).