https://github.com/pauloo27/gco
📝 Write God-tier commits
https://github.com/pauloo27/gco
commit git golang
Last synced: 5 months ago
JSON representation
📝 Write God-tier commits
- Host: GitHub
- URL: https://github.com/pauloo27/gco
- Owner: pauloo27
- License: gpl-2.0
- Created: 2021-07-10T00:41:05.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-22T05:49:57.000Z (over 3 years ago)
- Last Synced: 2025-01-25T13:42:18.301Z (over 1 year ago)
- Topics: commit, git, golang
- Language: Go
- Homepage:
- Size: 274 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GCO
Write God-tier commits.
[Agola CI](https://ci.notagovernment.agency/user/Pauloo27/projects/GCO.proj)
[](https://ci.db.cafe/user/Pauloo27/projects/gco.proj)

## Install
If you have Go installed, you can simply do:
`go install github.com/Pauloo27/gco/cmd/gco@latest`
## Config
You can create a config per repository, it should be placed at the root of
the git repository with the name `.gco.json` (create it by running `gco -init`).
You also can have a global config at `~/.config/gco.json`
(create it by running `gco -init-global`). The global config is used when
there's no config at the repository level.
## Prefix pack
You can either use text prefix (`feat:`, `fix:`, `ci:`) or emojis
(`✨`, `🐛`, `👷`). You will be prompt to select one when you run `gco --init`.
## Hooks
You can add Pre and Post commit hooks in `.gco.json`, like that:
```json
...
"PreCommit": [
{
"Command": "make",
"ExitOnFail": true,
"Ask": false
}
],
"PostCommit": [
{
"Command": "git push",
"ExitOnFail": true,
"Ask": true
}
]
...
```
A hook is made of:
- Command: the command to run.
- ExitOnFail: if the command fail, should the commit be cancelled?
- Ask: ask for confirmation before running the hook.
_GCO hooks does not replace Git hooks._
## License

This project is licensed under [GNU General Public License v2.0](./LICENSE).
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.