Timeglass

Fully automated time tracking for Git repositories. It uses hooks and file monitoring to make sure you'll never forget to start or stop your timer ever again. It is written in Go and runs 100% on your own workstation: no internet or account registration required.
Features:
- The timer automatically starts when you switch to a (new) branch using
git checkout
- The timer automatically pauses when it doesn't detect any file activity for a while
- The time you spent is automatically added to the next
git commit
- The timer increments in discreet steps: the minimal billable unit (MBU), by default this is 1m.
- Spent time is stored as metadata using git-notes and pushed automatically
Currently Supported: (see roadmap)
- Platforms: OSX
- Version Control: Git
Getting Started
-
Download the latest release for your platform and unzip the contents into a directory that is in your systems PATH (e.g /usr/local/bin)
-
Use your terminal to navigate to the repository that contains the project you would like to track and install the hooks:
cd ~/my-git-project
glass init
NOTE: you'll have to run this once per clone
- Start the timer by creating a new branch:
git checkout -b "testing_timeglass"
- Edit some files, get a coffee, and commit in order to register the time you spent:
git add -A
git commit -m "time flies when you're having fun"
- Verify that the time was indeed registered correctly by looking at your commit log:
git log -n 1
What's Next?
Now you know how to measure the time you are spending on each commit, you might want to learn more about...
- Supporting Other VCS: Timeglass currently only works for git repositories, mainly due to the number of hooks it provides. What other version control systems would you like to see implemented? Input welcome here
- Supporting other OSs: File monitoring is implemented differently across platforms. The current implementation uses FSEvents (OSX), let me know what other platforms you would like to see implemented here
Known Issues
- Handling
git stash: Git has the ability to stash work for a later commit prior to switching branches. Currently the timer unable to detect this; adding extra time to next commit. Input welcome here
- OS Restarts: Whenever the OS shuts down the repository might still contain uncommited work and a running timer, currently the timer is not restarted when this happens. Input on how to achieve this is welcome here
Contributors
in alphabetical order: