Skip to content

Instantly share code, notes, and snippets.

@DanieleDaccurso
Created March 19, 2018 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DanieleDaccurso/ce7960184cf762412c1f1216f693c5af to your computer and use it in GitHub Desktop.
Save DanieleDaccurso/ce7960184cf762412c1f1216f693c5af to your computer and use it in GitHub Desktop.
git wrapper for timetracking
#!/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