8000 GitHub - smallhadroncollider/cmt at 0.1.2
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 25, 2024. It is now read-only.

smallhadroncollider/cmt

Repository files navigation

cmt

Write consistent git commit messages

Installation

stack build && stack install

Usage

Add a .cmt file to your project directory.

cmt # will show the options and then commit

If you're using the ${*} format option then:

cmt "blah blah blah" # this will go in ${*} place

Format

A .cmt file consist of two parts: the input parts and the output format.

For example, the AngularJS Commit Message Guidelines:

{
    "Type" = [
        "feat",
        "fix",
        "docs",
        "style",
        "refactor",
        "test",
        "chore"
    ]
    "Scope" = @
    "Subject" = @
    "Body" = !@
    "Footer" = !@
}

${Type} (${Scope}): ${Subject}

${Body}

${Footer}

Input Parts

These are at the top of the .cmt file and surrounded by opening and closing curly braces. A consist of a name and a type:

  • @: single line input
  • !@: multi line input
  • ["option 1", "option 2"]: list of options

Output Format

The output format consists of named input parts plus anything else you want.

You can accept a output called ${*}, which will add in whatever is passed to cmt as command line arguments.

For example:

{
    "Scope" = @
}

(${Scope}): ${*}

Then use with:

cmt "Blah blah blah"

About

Write consistent git commit messages based on a custom template

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
0