Question

I want to see the commits of a particular branch without checking out to that branch and issue git log. Is that possible at all? I searched for a while but I found nothing!

Thanks

Was it helpful?

Solution

Simply run git log <branch>.

For instance, if you want to see the log for the master branch, run:

git log master

At least, this works for me (I'm using git 1.9.2).

OTHER TIPS

git log --branches=*<your-branchname> as stated in the manual:

Options>Commit Limiting

--branches[=<pattern>]

Pretend as if all the refs in refs/heads are listed on the command line as <commit>. If <pattern> is given, limit branches to ones matching given shell glob. If pattern lacks ?, *, or [, /* at the end is implied.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top