Created
April 19, 2018 15:27
-
-
Save EdOverflow/a9aad69a690d97a8da20cd4194ca6596 to your computer and use it in GitHub Desktop.
Simple Bash script to find interesting data in GIT logs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "*** Running..." | |
keywords=( | |
"password" | |
"key" | |
"passwd" | |
"secret" | |
) | |
echo | |
echo "Developers" | |
echo "==========" | |
if [[ $1 != "" ]]; then | |
git log --reflog --pretty="format:%aE" | sort | uniq | grep "$1" | |
fi | |
echo | |
echo "Keywords" | |
echo "========" | |
for word in ${keywords[@]}; do | |
git log --reflog --pretty="format:- (%H) %b" | grep --color "$word" | |
done | |
echo | |
echo "*** Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment