{"id":15067367,"url":"https://github.com/zaboco/git-timer","last_synced_at":"2025-10-05T08:30:43.552Z","repository":{"id":10573641,"uuid":"12780239","full_name":"zaboco/git-timer","owner":"zaboco","description":"CLI application that counts down until you commit","archived":true,"fork":false,"pushed_at":"2013-09-24T18:15:51.000Z","size":176,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-25T01:21:58.129Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/zaboco.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":"2013-09-12T09:45:38.000Z","updated_at":"2023-01-28T03:24:05.000Z","dependencies_parsed_at":"2022-09-26T17:41:08.447Z","dependency_job_id":null,"html_url":"https://github.com/zaboco/git-timer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaboco%2Fgit-timer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaboco%2Fgit-timer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaboco%2Fgit-timer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaboco%2Fgit-timer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zaboco","download_url":"https://codeload.github.com/zaboco/git-timer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235378521,"owners_count":18980463,"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-09-25T01:20:13.452Z","updated_at":"2025-10-05T08:30:38.255Z","avatar_url":"https://github.com/zaboco.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-timer\n\u003e _Commit until the time is up... or start over!_\n\n__git-timer__ is a `node.js` CLI application written in [LiveScript](http://livescript.net) that forces you to commit before a timer is up. It can be used for learning purposes (e.g. for a [Code Retreat](http://coderetreat.org/profiles/blogs/new-session-idea-baby-steps)), or just for regular use, to keep a good commit pace.\n\n## Installation\n```sh\n$ npm install -g git-timer\n```\n\n## How it works\nWhen you run it, it starts a countdown timer. You are suppose to write code and commit before the time is up. If you don't commit, the repository is reset (using `git reset --hard`) and the timer starts over. Else, if you commit before timeout, the timer simply resets, and you can move on to the next commit.\n\n### Advanced usage - commit only on \u003cspan style=\"color:green\"\u003egreen\u003c/span\u003e\nTo make things more challenging, you can add another rule to the game, by only allowing yourself to commit when all tests pass. You can enforce that by adding a [pre-commit hook](http://git-scm.com/book/en/Customizing-Git-Git-Hooks) that will run your test suite before commiting.\n\n\u003e If you are developing a `node.js` project and define `npm test` (in `package.json`), you just have to run `git-timer -g` (see section __Options__ below for details).\n\n## Options\n```sh\n$ git-timer -h\n\nUsage: git-timer [options]\n\nOptions:\n    -h, --help          output usage information\n    -V, --version       output the version number\n    -m, --minutes [min] specify timeout in minutes (default is 5)\n    -g, --green         Allow only commits on green.\n                        (!) node only - requires `npm test` to be defined.\n                        (!) WARNING: adds a pre-commit hook to git\n```\n\n* `--minutes` allows you to override the default timeout (5 minutes)\n* `--green` enforces commits only on green, assuming `npm test` is available. It basically creates a pre-commit script so that commits are allowed only if `npm test` passes.  \n    \u003ci\u003e__Notes__\n    - It only works if you don't already use a pre-commit hook.\n    - It can be reverted by `rm .git/hooks/pre-commit`\n    - If you use another language, you can still use this, just replace `npm test` with the test command, inside the generated pre-commit script\u003c/i\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaboco%2Fgit-timer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzaboco%2Fgit-timer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaboco%2Fgit-timer/lists"}