git-commiter

command module
v0.0.0-...-7cb8f44 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: MIT Imports: 5 Imported by: 0

README

git-commit-configurator

This program allows you to define and use rules for your git commits. The goal is to have a repository with structured commit but also explain to people who would like to contribute how commits should be written.

Prerequesite

Install

cd git-commit-configurator
go install .

Quick Test

# Supposed you are not in a git repository
 mkdir test
 cd test
 git init
 echo 'Bonjour' >> foo
 git add foo
 git cmt

Custom rules

Conventional commit
{
    "Name": "My commit config",
    "Description": "Use this field to add some metadata",
    "Rules": [
        {
            "Prefix": "feat",
            "Description": "feat: Implement new feature"
        },
        {
            "Prefix": "doc",
            "Description": "doc: writing doc"
        },
        {
            "Prefix": "fix",
            "Description": "fix: fix bug"
        },
        {
            "Prefix": "style",
            "Description": "style: change something without modyfing feature"
        },
        {
            "Prefix": "ci",
            "Description": "ci: improve ci"
        }
    ]
}
Modifier style
{
    "Name": "My commit config",
    "Description": "Use this field to add some metadata",
    "Rules": [
        {
            "Prefix": "[ADD]",
            "Description": "[ADD]: Add some code"
        },
        {
            "Prefix": "[UPT]",
            "Description": "[UPT]: Update or improve some code"
        },
        {
            "Prefix": "[FIX]",
            "Description": "[FIX]: fix bug"
        }
    ]
}
Why not emojis ?
{
    "Name": "My commit config",
    "Description": "Use this field to add some metadata",
    "Rules": [
        {
            "Prefix": "✨",
            "Description": "✨: New feature"
        },
        {
            "Prefix": "🐛",
            "Description": "🐛: Fix bug"
        },
        {
            "Prefix": "📚",
            "Description": "📚: Add some documentation"
        }
    ]
}

License

MIT licensed

Copyright (c) 2020 Anas El Halouani

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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