Last active
December 15, 2018 07:28
-
-
Save tenfyzhong/792aba96820f79b9eab4660286af9903 to your computer and use it in GitHub Desktop.
log git commit
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
toplevel=$(git rev-parse --show-toplevel) | |
log_file=$HOME/.commit_log/$(date +%Y)_week_$(date +%U).log | |
message=$(git log -1 --pretty=format:'%H%n%cd%n%s%n%b') | |
mkdir -p "$HOME/.commit_log" | |
touch "$log_file" | |
printf "%s\n$message\n--------------------------------------------------------------------------------\n" "$toplevel" >> "$log_file" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment