Is there a way to hide bot commits (e.g., generated stats updates) from commit history? (git.disroot.org)
from MindfulMaverick@piefed.zip to programming@programming.dev on 05 Jun 10:13
https://piefed.zip/c/programming@piefed.zip/p/1553734/is-there-a-way-to-hide-bot-commits-e-g-generated-stats-updates-from-commit-history

I’m working on a Lemmy/PieFed instance generator that periodically updates instance stats. It’s working great, but the commit history is going to get cluttered with dozens of “auto-update stats” bot commits. I’d ideally like my git log to show only real code changes—not these automated data commits.

Is there a way to keep the commits in the repo (for deployment/sync purposes) but prevent them from appearing in the default history view? Maybe a special branch, a secondary repo, or some Git trick I’m missing?

Thanks for any ideas!

#programming

threaded - newest

CombatWombat@feddit.online on 05 Jun 13:17 next collapse

The --committer and --author flags to git log accept a regex, so just match on everything that isn’t your bot.

Chewt@beehaw.org on 05 Jun 13:17 collapse

I don’t have a terminal in front of me to double check, but I’m sure you can filter logs with a flag, then set an alias for git log in the repo-local git config to always include that filter