Tracking work hours through git

I recently finished a project that involved me working variable hours in one sitting.

For example, I might start at 8AM and go till 2:30 PM.
I would make a commit as soon as I started, and commit right before I left.

I want to approximate how many hours I have worked on this project.

I had planned on looking through my commits and figuring this out manually, but the git web interface just gives a vague timestamp such as “authored 2 months ago”.

Does anybody know of any third party app that counts hours through git?

Or hopefully provide any pointers on what to try next?


  • git automatic files tracking
  • Ignore pushing directory, but still track in Git
  • How to set tracking on an existing repo to a remote repo with ngit (or jgit)?
  • Git: Is there a short way to setup a new branch to track a remote branch?
  • Proper git remote tracking practice
  • My local git tracking branch isn't working properly. I need advice on how to set it up
  • git fetch vs. git fetch origin master have different effects on tracking branch
  • Checking out equivalent branches causes untracked files to appear
  • 3 Solutions collect form web for “Tracking work hours through git”

    I have created git-hours tool to estimate the hours spent on a git repository as you described.

    The algorithm to calculate the hours is quite simple and dumb. See the documentation to get an idea how it works:

    For example, estimating hours spend on Bootstrap:

    ➜  bootstrap git:(master) git hours
      "total": {
        "hours": 9959,
        "commits": 11470

    Please note that the information is not accurate enough to be used in billing. It gives a rough idea of the project’s size.

    npm install git-hours -g

    then , run :

    cd /to/your/local/repository
    git hours ; # total of all time
    git hours --since yesterday # since yesterday

    You can use Assembla Space with (at least) Git repository (Assembla’s or Github’s or Bitbucket’s) and Time Tool (and specially formatted Git’s commit message) and get integrated by custom period time-reports from Time Tab.

    Anyway, time tracking for every single commit is your own task – nobody knows, how much you really work between two consecutive commits

    Git Baby is a git and github fan, let's start git clone.