View git log without merge commits

前端 未结 2 1377
别跟我提以往
别跟我提以往 2021-01-31 06:46

I\'m trying to view commits made by a specific user, and want to remove any merges done by the user from the output. How can I do so?

I can check for the commits of a u

2条回答
  •  别跟我提以往
    2021-01-31 07:32

    use

    git log --author= --no-merges
    

    Additionally the --first-parent option may give useful result for you:

    --first-parent Follow only the first parent commit upon seeing a merge commit. This option can give a better overview when viewing the evolution of a particular topic branch, because merges into a topic branch tend to be only about adjusting to updated upstream from time to time, and this option allows you to ignore the individual commits brought in to your history by such a merge. Cannot be combined with --bisect.

提交回复
热议问题