{"id":13632035,"url":"https://github.com/pimterry/git-confirm","last_synced_at":"2025-05-16T05:07:48.771Z","repository":{"id":41456396,"uuid":"64464529","full_name":"pimterry/git-confirm","owner":"pimterry","description":":question: Git hook to catch placeholders and temporary changes (TODO / @ignore) before you commit them.","archived":false,"fork":false,"pushed_at":"2024-10-11T15:30:44.000Z","size":511,"stargazers_count":392,"open_issues_count":15,"forks_count":17,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-08T15:12:59.277Z","etag":null,"topics":["git","git-addons","git-hook","git-hooks"],"latest_commit_sha":null,"homepage":"https://github.com/pimterry/git-confirm","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pimterry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-29T08:30:13.000Z","updated_at":"2025-04-08T12:58:49.000Z","dependencies_parsed_at":"2024-10-26T20:34:17.679Z","dependency_job_id":"510c132c-c452-4e1d-946a-d94d780bad5c","html_url":"https://github.com/pimterry/git-confirm","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimterry%2Fgit-confirm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimterry%2Fgit-confirm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimterry%2Fgit-confirm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimterry%2Fgit-confirm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pimterry","download_url":"https://codeload.github.com/pimterry/git-confirm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471059,"owners_count":22076585,"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":["git","git-addons","git-hook","git-hooks"],"created_at":"2024-08-01T22:02:48.977Z","updated_at":"2025-05-16T05:07:43.762Z","avatar_url":"https://github.com/pimterry.png","language":"Shell","readme":"# git-confirm [![Build Status](https://github.com/pimterry/git-confirm/workflows/CI/badge.svg)](https://github.com/pimterry/git-confirm/actions)\n\nGit hook to catch placeholders and temporary changes (TODO / @ignore) before you commit them.\n\n[![Asciicast DEMO](asciicast.gif)](https://asciinema.org/a/dc7dr433caze9f8p65bitqs77?speed=2\u0026autoplay=1)\n\nGit Confirm:\n\n* Stops you ever accidentally committing bad temporary changes.\n* Is interactive, checking each match with you so you can't miss it (and can still include it if you like).\n* Only considers lines newly `add`ed and about to be committed, so no false positives.\n* Includes (diff-colorized) context with each match\n* Installs in any project with a single command\n* Is configurable to match any number of strings, through standard git config\n* Is well tested. See [tests/test-hook.bats](https://github.com/pimterry/git-confirm/blob/master/test/test-hook.bats#L40-L9999).\n* Works on Linux, OSX and Windows ([in Powershell at least](https://twitter.com/afnpires/status/768403583263973376)), with no dependencies.\n\n## To Install\nIn the root of your Git repository, run:\n\n```bash\ncurl -sSfL https://cdn.rawgit.com/pimterry/git-confirm/v0.2.2/hook.sh \u003e .git/hooks/pre-commit \u0026\u0026 chmod +x .git/hooks/pre-commit\n```\n(*Note the version number*)\n\nAll done. If you want to check it's installed correctly you can run:\n\n```bash\necho \"TODO\" \u003e ./test-git-confirm\ngit add ./test-git-confirm\n\n# Should prompt you to confirm added 'TODO'. Press 'n' to cancel commit.\ngit commit -m \"Testing git confirm\"\n```\n\n*If you're security conscious, you may be reasonably suspicious of\n[curling executable files](https://www.seancassidy.me/dont-pipe-to-your-shell.html).\nHere you're on HTTPS throughout though, and you're not piping directly to execution so you can\ncheck contents and the hash (against MD5 9ee7ff55f7688f9055a9056bd2617a02 for v0.2.2) before using this, if you like.*\n\n## To Configure\n\nBy default, git-confirm will catch and warn about lines including 'TODO' only.\n\nIf you want to match a different pattern, you can override this default and set your own patterns:\n\n```bash\ngit config --add hooks.confirm.match \"TODO\"\n```\n\nMatches are passed verbatim to your local `grep`, and are treated as regular expressions. Note that all matches are case-sensitive.\n\nYou can repeatedly add patterns, and each of them will be matched in turn. To get, remove or totally\nclear your config, use the standard [Git Config](https://git-scm.com/docs/git-config) commands:\n\n```bash\ngit config --get-all hooks.confirm.match\ngit config --unset hooks.confirm.match 'TODO'\ngit config --unset-all hooks.confirm.match\n```\n\n## Contributing\nWant to file a bug? That's great! Please search issues first though to check it hasn't already been filed, and provide as much information as you can (your OS, terminal and Git-Confirm version as a minimum).\n\nWant to help improve Git-Confirm?\n\n* Check out the project:\n  `git clone --recursive https://github.com/pimterry/git-confirm.git`\n\n  (Note 'recursive' - this ensures submodules are included)\n* Check the tests pass locally: `./test.sh`\n* Add tests for your change in test/test-hook.bats\n\n  Check out the [BATS](https://github.com/sstephenson/bats) documentation if you're not familiar with it, or just crib from the existing tests.\n* Add any documentation required to this README.\n* Commit and push your changes\n* Open a PR!\n\nNeed any ideas? Take a look at the Git Confirm [issues](https://github.com/pimterry/git-confirm/issues/) to quickly see the next features to look at.\n\n## Release process\n\n* Make changes\n* Update Curl version number and hash (`md5 ./hook.sh`) in README.\n* Commit everything\n* Tag with new version numbers (`git tag vX.Y.Z`)\n* Push including tags (`git push origin --tags`)\n","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpimterry%2Fgit-confirm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpimterry%2Fgit-confirm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpimterry%2Fgit-confirm/lists"}