gco

module
v0.0.0-...-af7dd4a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2022 License: GPL-2.0

README

GCO

Write God-tier commits.

Agola CI

CI status

Usage example gif

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:

...

  "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

GPL Logo

This project is licensed under GNU General Public License v2.0.

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.

Directories

Path Synopsis
cmd
gco
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL