Skip to content

Commit 79b3d3d

Browse files
committed
Add a TIP explaining the log option '--no-merges'
Given how merge commits can clutter up one's log output, make sure readers understand the --no-merges option.
1 parent acb7169 commit 79b3d3d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

book/02-git-basics/sections/viewing-history.asc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,3 +295,10 @@ b0ad11e - pull: allow "git pull origin $something:$current_branch" into an unbor
295295
----
296296

297297
Of the nearly 40,000 commits in the Git source code history, this command shows the 6 that match those criteria.
298+
299+
[TIP]
300+
.Preventing the display of merge commits
301+
====
302+
Depending on the workflow used in your repository, it's possible that a sizable percentage of the commits in your log history are just merge commits, which typically aren't very informative.
303+
To prevent the display of merge commits cluttering up your log history, simply add the log option `--no-merges`.
304+
====

0 commit comments

Comments
 (0)