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?
Thanks!
Since I couldn't manage to build git-hours I made a tool to estimate the work done by each developer on the repository, following a similar simple algorithm: it still assumes a flat duration for the first commit of the session.
You can get it here: git-estimate
The code is written in plain go and uses go-git to read the repo's commits.
At a minimum run:
git-estimate -repo=/path/to/repo
this will use default settings to compute the time spent on the repo at the specified path.
git-estimate -h
-baseline float
baseline value for session estimate (default 2)
-estimate string
estimation method. Accepted values are "session" and "day". (default "session")
-json
if true will output estimates in JSON format
-repo string
git repository path. If no flag is specified the current folder is assumed (default ".")
git-hours didn't work for me. So I have built a simple npm script called git-time.
Install
npm install -g git-time
Usage
git-time <path>
Where <path>
should be a valid Git repo root path.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With