gitk - don't show labels for branches that don't match glob or regexp

152 views Asked by At

I'm in a huge repo with lots of committers and branches all over. I use gitk to visualize history and normally I limit the output using --glob=*IDENTIFIER*. However, if there are some branches pointing to commits that are in the filtered view - they are sill shown (even if their name doesn't include IDENTIFIER at all).
Is there a way to not show them?

Example

GitHub repo for screenshots: https://github.com/chhh/too-many-labels-in-gitk

I want to see only branch labels (remote or local) that have feature in them.
gitk --simplify-by-decoration --all sample simplified view of the repo:

simplified view of the repo gitk --all --simplify-by-decoration

I want to see just the feature branches.

gitk --simplify-by-decoration --glob=*feature/*

enter image description here

It's better, leaf branches such as garbage/11 at the top is gone now. But all the clutter from intermediate garbage and experiment branches is still visible I only want to see labels that start with feature/, i.e. remove the ones that are marked red in the next screenshot:

enter image description here

1

There are 1 answers

1
LeGEC On

AFAIK gitk takes the exact same options as git log, so you can check git log's documentation.

Try : --decorate-refs=<pattern>