-
-
Save DanieleDaccurso/ce7960184cf762412c1f1216f693c5af to your computer and use it in GitHub Desktop.
git wrapper for timetracking
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 | |
# change this to your real git executable | |
GIT="/usr/bin/git" | |
# change this to your log file of choice | |
LOGFILE="/var/log/gitwrapper/`date +%Y-%m-%d`-actions.log" | |
# If the logfile doesn't exist yet, create | |
if [ ! -f $LOGFILE ]; then | |
touch $LOGFILE | |
fi | |
echo `date '+%Y-%m-%d %H:%M:%S'` `pwd` $@ >> $LOGFILE | |
$GIT "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment