Highway of Life Highway of Life - 1 year ago 149
Git Question

How Do I run Git Log to see changes only for a specific branch?

I have a local branch tracking the remote/master branch. After running git-pull and git-log, the log will show all commits in the remote tracking branch as well as the current branch. However, because there were so many changes made to the remote branch, I need to see just the commits made to the current local branch.

What would be the git command to use to only show commits for a specific branch?

Config info:

[branch "my-branch"]
remote = origin
merge = refs/heads/master

Answer Source

Assuming that your branch was created off of master :

git cherry -v master


git log master..

If your branch was made off of origin/master, then say origin/master instead of master.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download