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 b
Use:
git log --graph --abbrev-commit --decorate --first-parent
It is only for the target branch (of course --graph, --abbrev-commit --decorate are more polishing).
The key option is --first-parent
: "Follow only the first parent commit upon seeing a merge commit" (https://git-scm.com/docs/git-log)
It prevents the commit forks from being displayed.