TL; DR
Using
git log <branch>
where <branch> is the name of the branch of interest.
From the git-log man page ...
A simplified version of the git-log syntax given in that command page
git log [<revision range>]
Further down you can find the following snippet:
If <revision range> not specified, by default it is HEAD (i.e., the whole history leading to the current commit)
This suggests that git log equivalent to git log HEAD . If you are on a branch called mybranch , let's say this command is also equivalent to git log mybranch .
You want to restrict access to the log to achieve reachability from another branch, that is, a branch that you are not currently in. The easiest way to do this is to explicitly pass the name of the branch of interest to git log :
git log <branchname>
More information on the many forms that the <revision-range> argument can take can be found in the gitrevisions manpage .
Jubobs
source share