Search code examples
gitsecuritylogginggrepcommit

How to get security relevant commits in a git repository?


I'm just thinking how best to output security related git commits using git log.

Maybe:

git log all --grep='security'

I would be grateful for any better ideas.


Solution

  • git log --pretty=format:'%h %aI | %s%d [%an]' | grep -i "security"
    

    should list all the commits with the keyword "security" in it.

    I hope it's what you are looking for.