Monitoring Hours of Work using Git

To make the Time Tracker plugin compatible with PyCharm, you can contact the author through Alternatively, you can search for time tracking plugins in Preferences>Plugins, but none of the IntelliJ IDEA plugins seem to be updated for PyCharm compatibility.


I have just completed a project that required me to work for extended hours without any fixed schedule.

To illustrate, my work hours would be from 8AM to 2:30 PM, during which I would create a commit at the beginning of my shift and another just before it ends.

I’m interested in estimating the total number of hours that I’ve invested in this project.

Although I had intended to manually go through my commits and solve this problem, the git web interface provides only a vague timestamp, stating that it was “authored 2 months ago”.

Is there any external application available that can track the number of hours using git?

Can you suggest any further steps to take or provide any helpful tips?


Solution 1:

As per your instructions, I have developed a tool called git-hours that can calculate the time spent on a git repository.

The process for determining the duration is straightforward and unsophisticated. For a better understanding of its functionality, refer to the instructions available at

As an illustration, approximating the amount of time dedicated to Bootstrap.

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

Kindly be advised that the details provided are not precise for billing purposes, but rather provide an approximate estimation of the project’s magnitude.

Solution 2:

Since git-hours did not prove to be effective for me, I developed a basic npm script named


npm install -g git-time


git-time <path>

Please make sure that the root path for the Git repository, identified as


, is valid.

Solution 3:

npm install git-hours -g

then , run :

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

Solution 4:

Additionally, a Python script named coded4 is available for the same purpose. The setup process is as follows:

git clone git://
cd coded4
./ develop


cd /to/your/local/repository
coded4 .

And to give a general notion of the alternatives at hand:

coded4 -h
usage: coded4 [-h] [--repo TYPE] [--format FORMAT] [--since DATE]
              [--until DATE] [--cluster-algo ALGO] [--approx-algo ALGO]
              [--epsilon MINUTES]

Additionally, there is a blog post on utilizing git-pandas to obtain time projections and a git_time_extractor.

Frequently Asked Questions

Posted in Git