Created
August 6, 2013 20:40
-
-
Save mfpiccolo/6168419 to your computer and use it in GitHub Desktop.
Post Commit - Phil edit
This file contains hidden or 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/sh | |
message=`git log -1 HEAD --format=format:%s` | |
branch=`git rev-parse --abbrev-ref HEAD` | |
data="`date`,${PWD##*/},${branch},${message}" | |
commit_log="~/commits/commits.csv" | |
echo $data >> $commit_log | |
echo "Added: $data to $commit_log" | |
# You must run both of these in each dir you want the script to run: | |
# git init | |
# chmod u+x .git/hooks/post-commit | |
# To run after gitx commit you have to open preferences and make sure that | |
# Git Executable: points to post-commit in ~/git_template/hooks/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment