{"id":16506794,"url":"https://github.com/screamingdev/git-time","last_synced_at":"2025-06-24T16:43:38.750Z","repository":{"id":57056102,"uuid":"59547884","full_name":"ScreamingDev/git-time","owner":"ScreamingDev","description":"Estimate time you took on an branch, path or whole history","archived":false,"fork":false,"pushed_at":"2018-01-17T18:18:16.000Z","size":25,"stargazers_count":16,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T10:11:29.803Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ScreamingDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-24T06:51:49.000Z","updated_at":"2023-11-10T02:47:56.000Z","dependencies_parsed_at":"2022-08-24T06:01:02.595Z","dependency_job_id":null,"html_url":"https://github.com/ScreamingDev/git-time","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreamingDev%2Fgit-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreamingDev%2Fgit-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreamingDev%2Fgit-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreamingDev%2Fgit-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ScreamingDev","download_url":"https://codeload.github.com/ScreamingDev/git-time/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238579174,"owners_count":19495510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T15:22:15.435Z","updated_at":"2025-02-13T01:33:08.769Z","avatar_url":"https://github.com/ScreamingDev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git time\n\n- How much does that **feature cost**? `git time src/feature/path` \n- What did I do **today**? `git time --me -v --since=yesterday`\n- Did we **invoice** everything? `git time -v --since=\"end of last month\"`\n\nThe `-v` gives you a nice table showing the time spend on each commit.\n\n## Installation\n\nWorks best as global composer package:\n\n    composer global require sourcerer-mike/git-time\n    \n    # Do you have your composer bin accessible? If not ...\n    echo 'PATH=$PATH:~/.config/composer/vendor/bin' \u003e\u003e ~/.bashrc\n\nor local installation per project (`composer require sourcerer-mike/git-time:dev-master`).\nYou might like to add ` ~/.config/composer/vendor/bin/` to your PATH variable in Bash ;)\n\n\n## Estimate the time taken on a project or feature\n\nCheck how long you took for that?\n\n    git-time estimate src/my-feature/foo.php\n    \n    # or for a specific time range\n    git-time estimate 13ea7dd..HEAD\n    \n    # or both\n    git-time estimate 13ea7dd..HEAD  src/my-feature/foo.php\n    \n    # for a particular time range (e.g. today) and a single author(maybe for you to clock at work)\n    git-time estimate -v --since 00:00 --author \"Mike Pretzlaw\"\n\n\nThe result will be shown in a table:\n\n    +---------+------------------+------------------------------------------+-------------+-------------+\n    | Hash    | Date             | Message                                  | Duration    | Cumulated   |\n    +---------+------------------+------------------------------------------+-------------+-------------+\n    | 18b978f | 2016-05-23 21:51 | initial empty commit                     |          1m |          1m |\n    | feced85 | 2016-05-24 07:52 | Estimate taken time with max cap         |         30m |         31m |\n    | d2c50ce | 2016-05-24 08:20 | Fetch parent commits                     |         28m |         59m |\n    | d21fd09 | 2016-05-24 08:38 | Calculate time related to parent commit. |         19m |      1h 18m |\n    +---------+------------------+------------------------------------------+-------------+-------------+\n\n\nMight be all. Did I miss something?\n\n## How it works\n\nImagine you run `git time -v` on these commits:\n\n    Initial commit              second                 third          fourth\n                |                  |                     |               |\n                |--- 10 minutes ---|------ ~7 days ------|-- 3 minutes --|\n                |                  |                     |               |\n    last week 12:00              12:10           today 10:20           10:23\n                |                  |                     |               |\n                |--- 10 minutes ---|---- 30 minutes -----|-- 3 minutes --|\n                |                  |  limited to maximum |               |\n     Total of 43 minutes\n\nThe limit can be changed using `git time --max=60` (minutes)\nand there is even more about this:\n\n- The **initial commit** itself will count as **one minute**.\n  You don't really need long for opening a GIT repo.\n  If so change this time via `--no-parent-time` and set it to hours if you take that long ;)\n- From **initial commit** to **second** it took you **10 minutes**.\n  That's okay, we add that and have 11 minutes in total now.\n- But from **second** to **third** you fell asleep and continue to work one week (or day) later.\n  This is a gap of days but `git-time` limits this down to **30 minutes**.\n  If you don't like this limit then change it via the `--max` option.\n- The last and **fourth** commit is easy.\n  Just **3 minutes** after the previous one which makes it 44 minutes in total for this project.\n  Pretty small one.\n\nProviding the `-v` flag will give you a cleaner nicer look at this:\n\n    +---------+------------------+----------------------+-------------+-------------+\n    | Hash    | Date             | Message              | Duration    | Cumulated   |\n    +---------+------------------+----------------------+-------------+-------------+\n    | 18b978f | yesterday 12:00  | initial empty commit |          1m |          1m |\n    | feced85 | yesterday 12:10  | second               |         10m |         11m |\n    | d2c50ce | today 10:20      | third                |         30m |         41m |\n    | d21fd09 | today 10:23      | fourth               |          3m |         44m |\n    +---------+------------------+----------------------+-------------+-------------+\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscreamingdev%2Fgit-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscreamingdev%2Fgit-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscreamingdev%2Fgit-time/lists"}