{"id":13994830,"url":"https://github.com/aaossa/git-gud","last_synced_at":"2025-07-22T20:32:48.013Z","repository":{"id":104385433,"uuid":"119313080","full_name":"aaossa/git-gud","owner":"aaossa","description":"A simple git commit checker","archived":false,"fork":false,"pushed_at":"2024-10-13T18:04:44.000Z","size":18,"stargazers_count":74,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-29T17:37:51.161Z","etag":null,"topics":["bash-script","git"],"latest_commit_sha":null,"homepage":"","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/aaossa.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}},"created_at":"2018-01-29T00:54:52.000Z","updated_at":"2024-10-13T18:04:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"f24c99c0-a3c1-4c11-b3f5-05971e44d4ec","html_url":"https://github.com/aaossa/git-gud","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aaossa/git-gud","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaossa%2Fgit-gud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaossa%2Fgit-gud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaossa%2Fgit-gud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaossa%2Fgit-gud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaossa","download_url":"https://codeload.github.com/aaossa/git-gud/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaossa%2Fgit-gud/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266567507,"owners_count":23949368,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bash-script","git"],"created_at":"2024-08-09T14:03:07.703Z","updated_at":"2025-07-22T20:32:44.014Z","avatar_url":"https://github.com/aaossa.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# git-gud\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Faaossa%2Fgit-gud.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Faaossa%2Fgit-gud?ref=badge_shield)\n\n\nA simple git commit checker. I often use a commit message template I created a while ago, and I wanted to make sure that everything was in the right place after writing a commit, that's why this script exists. Use it if you want to *git gud* too. To add this custom git command to git, just place the file in a folder that's in your path (a.k.a `PATH`). You can [setup `git-gud` as custom command](https://github.com/aaossa/git-gud/wiki/Setup-'git-gud'-as-custom-command) or [setup `git-gud` as `post-commit` hook](https://github.com/aaossa/git-gud/wiki/Setup-'git-gud'-as-'post-commit'-hook).\n\n### Usage\n\nYou can use the same commit limmits as in `git log`: `--author`, `--number`, `--until`, `--before`, and more. ([`git-log` docs](https://git-scm.com/docs/git-log#_commit_limiting)). Some basic examples:\n\n```bash\n# Check last commit\n$ git gud\n\n# Check \u003cnumber\u003e commits in the current branch\n$ git gud -\u003cnumber\u003e\n$ git gud -n \u003cnumber\u003e\n$ git gud --max-count=\u003cnumber\u003e\n\n# Check commits in another branch\n$ git gud \u003cbranch\u003e\n$ git gud \u003cbranch\u003e -\u003cnumber\u003e\n$ git gud -n \u003cnumber\u003e \u003cbranch\u003e\n\n# And... a sample output\n$ git gud\n\nChecking... afaeaf5\n\u003e OK: Author name format is valid (Antonio Ossa)\n\u003e OK: Author email format is valid (aaossa@uc.cl)\n\u003e OK: Commiter name format is valid (Antonio Ossa)\n\u003e OK: Commiter email format is valid (aaossa@uc.cl)\n\u003e ERROR: Subject is too long (59 \u003e 50)\n\u003e ERROR: Body is empty (0 == 0)\n\u003e OK: Body includes comment (2 \u003e 0)\n\u003e OK: 'Signed-off-by' line is not empty (42 \u003e 0)\n\u003e OK: 'Signed-off-by' line has author information\n\u003e WARNING: Signature is not valid (Status: N)\n```\n\n### Checks\n\n- [x] Commit author name is in a valid format ( `Antonio Ossa`)\n- [x] Commit author name is the same in your config file\n- [x] Commit author email is in a valid format (`aaossa@uc.cl`)\n- [x] Commit author email is the same in your config file\n- [x] Commit subject message uses a maximum of **50 characters**\n- [x] Commit body message is not empty\n- [x] Commit body message lines use a maximum of **72 characters**\n- [x] Commit body message has lines with comments (i.e. not \"Signed-off-by: ...\")\n- [x] Commit body message has a \"Signed-off-by: ...\" line (`Signed-off-by: Antonio Ossa \u003caaossa@uc.cl\u003e`)\n- [x] Commit signature is \"good\"\n\n### Template\n\nThis is the template I use. You can find it as [`.gitmessage`](https://github.com/aaossa/git-gud/blob/master/.gitmessage) in this repo and install it following [these instructions](https://github.com/aaossa/git-gud/wiki/Setup-a-commit-template). The script assumes that you're following these conventions, but you can use your own template if you want (or none) and customize the checker too! That's why is OSS :heart::\n\n```\n# |\u003c----  Using a Maximum Of 50 Characters  ----\u003e|\n# If this commit is applied, it will...\n# Examples of imperative mood: Refactor X, Update Y, Remove Z\nSubject\n\n# |\u003c----   Try To Limit Each Line to a Maximum Of 72 Characters   ----\u003e|\n# What/why/how was this change made?\n\n# Any references to relevant tickets, articles, resources, etc?\n# Example: GitHub issue #23\n\n# Something more?\n# Reported-by: A person or @somebody\nSigned-off-by: Antonio Ossa \u003caaossa@uc.cl\u003e\n\n# (:heart: emoji? http://emoji.muan.co/)\n\n```\n\n### To do\n\n- [X] ~~Wiki: How to use template~~\n- [X] ~~Instructions: Use git-gud as custom command~~\n- [X] ~~Instructions: Use git-gud as post-commit hook~~\n- [x] ~~Script: Allow check multiple commits (`git gud -n 10`)~~\n- [x] ~~Script: Allow check on another branch (`git gud branch`)~~\n- [ ] Script: Check imperative mood in subject\n- [ ] Script: Add flags about output verbosity (`--full`/current, `--warn`/warnings+errors, `--error`/errors only)\n\n### License\n\nThis software is released under the [MIT License](https://opensource.org/licenses/MIT)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Faaossa%2Fgit-gud.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Faaossa%2Fgit-gud?ref=badge_large)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaossa%2Fgit-gud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaossa%2Fgit-gud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaossa%2Fgit-gud/lists"}