Limit refs shown with git log --decorate
You cannot limit this out-of-the box. But nothing is stopping you from scripting the manipulation of .git/refs and then restoring it right after :).
No. If you're using decorate, it will use all available names as decorations. --decorate=short
will reduce the clutter, but not reduce the total number of decorations you're going to be looking at.
You could write a script which decorates the output of git log
yourself quite easily, if you need this specific functionality.
Starting with Git 2.16, the option --decorate-refs-exclude
allows:
--decorate-refs= --decorate-refs-exclude=
If no --decorate-refs is given, pretend as if all refs were included. For each candidate, do not use it for decoration if it
matches any patterns given to --decorate-refs-exclude or if it doesn’t match any of the patterns given to --decorate-refs.