Skip to content
Krzysztof Czarnecki edited this page Oct 9, 2021 · 9 revisions

mkcommit

Installation

If you have Python set up, you're good to go. Run pip install mkcommit and you're done.

Usage

  • Run mkcommit to generate a Git commit message and commit changes (calls git commit -m underneath).
  • Run mkcommit -s to generate a Git commit message and print it to standard output.
  • Run mkcommit -c to generate a Git commmit message and copy it to your clipboard.
  • Use mkcommit -x "some commit message" to validate an existing commit message from the command line or as a Git Hook command (requires on_commit(msg) function to be implemented in the configuration file).

If you wish to point mkcommit to a specific configuration file, use mkcommit -f /path/to/.mkcommit.py. You can combine the -f flag with all the other available flags.

Check out the README for quickstart configuration info.

ToC

  • Configuration - describes how to create and manage Python config files.
  • Include - describes the include function that allows you to reuse configuration files accross repositories.
  • Validators - lists all available validators, how to use them and how to create your own.
  • Multiple Selection - describes how to handle Keyword lists and other arbitrary objects with CommaSeparatedList.
  • Suites - describes how to prepare your own reusable suites that can be shared between projects. Also describes how to use the built-in semantic suite.
  • Hooks - describes how to use the on_commit function definition to enable mkcommit -x hook mode.
  • Using Editors - prototypical functionality of triggering editors while editing longer commit messages
  • Interacting with Git - guides on how to interact with git directly

Examples

Clone this wiki locally