Skip to content

Instantly share code, notes, and snippets.

@yaotti
Created February 1, 2011 00:54
Show Gist options
  • Save yaotti/805197 to your computer and use it in GitHub Desktop.
Save yaotti/805197 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Show # of commits in the repository today
# $ cp num-of-commits.sh .git/hooks/post-commit
num_of_commits=$(git log --oneline --since="today 00:00:00" | wc -l | sed 's/^[ ]*//')
echo "Today's commits: $num_of_commits"
# # Repository dir
# cd $(git rev-parse --show-cdup)
# pwd=${PWD##*/}
# growlnotify -a GitX -t $pwd -m "Today's commits: $num_of_commits"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment