Free tool

Git hours estimator

Paste the output of git log and see roughly how many hours the commits represent, split by author and by month. The log stays in your browser.

Updated

Paste a log or load the example to see the estimate.

Get the log

Run this in your repository and paste the output into the box above:

git log --no-merges --date=iso-strict --pretty=format:"%ad|%an|%s"

Narrow it down to your own work in one month:

git log --no-merges --author="you@example.com" \
  --since="2026-09-01" --until="2026-09-30" \
  --date=iso-strict --pretty=format:"%ad|%an|%s"

The default output of git log works as well. The tool reads the Author: and Date: lines and ignores the rest.

How the estimate works

  1. The commits are sorted by time, separately for each author.
  2. Two commits that are no more than the session gap apart belong to the same session. The time between them counts as work.
  3. A commit after a longer break starts a new session. Nothing is known about the time before it, so a fixed allowance is added instead.
  4. The sessions are added up per author and per month.

Both settings start at 120 minutes, the defaults that tools of this kind commonly use. If you commit often, lower them. If you work for hours between commits, raise them.

An example

CommitGap to the previous commitCounted
09:00first commit of the day2 h allowance
09:3030 min0.5 h
10:3060 min1 h
15:305 h, a new session2 h allowance
Total5.5 h

What the estimate cannot see

  • Work without commits. Meetings, code review, debugging that ends in a one-line fix, reading documentation.
  • Rewritten history. Squash merges collapse a day of commits into one. Estimate from the feature branch before it is squashed, or from your own clone.
  • Commit habits. Someone who commits once a day looks like they worked two hours. Someone who commits every ten minutes is measured almost exactly.
  • Shared authorship. Pair programming shows up under one name.

So use the result the way you would use a bank statement to check your bookkeeping: as a second source that tells you whether your own records are plausible.

From hours to an invoice

If you bill by the hour, the estimate helps you fill in a month you did not track. Put the hours on an invoice with the invoice generator, or let Git Invoice list your pull requests and commits so that every line on the invoice points at the work it bills. To decide what an hour should cost, see the hourly rate calculator.

Questions and answers

Does git track how long I worked?

No. Git records when a commit was made, not how long the work took. Any hour count derived from git is an estimate built on the gaps between commits.

How accurate is the estimate?

It depends on how you commit. Frequent, small commits give a good picture. Long stretches without a commit, large squashed commits and work that never reaches git (meetings, reviews, research) make the estimate too low. Treat the number as a cross-check for your own time records.

Which date does the estimate use?

The date in your log. With %ad that is the author date, which stays the same when a commit is rebased or cherry-picked. With %cd it is the committer date, which changes on a rebase and can bunch many commits into a single minute.

Is my git log uploaded?

No. The log is parsed in your browser and never leaves your device.

Can I estimate hours for one author only?

Yes. Add --author to the git log command, or paste the log of everyone: if the author is the field after the date, the result table lists each author separately.

Can I turn the hours into an invoice?

Yes. Use the hours as a starting point in the invoice generator, or sign in to Git Invoice, which lists your pull requests and commits and lets you enter the hours per item.

Stop guessing what last month was worth

Connect a repository and have a client-ready PDF in about two minutes.

Star on GitHub