Lenbok · 2022-05-09 22:31
I often use `l a` to log all references on a repository, however for repos that use gh-pages, often the `origin/gh-pages` branch swamps the display.
Is there a away to have `l a` or `l b` ignore particular branches to bring this back to being usable on such repos?
magthe0 · 2022-05-11 05:10
At work we have a few such branches for the GitOps setup that I never want to see. As I don't need them at all locally, ever, I simply remove them. Not sure if it's an option for OP, but this is what I do:
```
#! /usr/bin/bash
# ignore the gitops branches
for ref in staging sandbox production; do
git config --local --add remote.origin.fetch "^refs/heads/${ref}"
git update-ref -d refs/remotes/origin/${ref}
done
```