git-commit-template

command module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 4 Imported by: 0

README

git-commit-template

CI

Command-Line utility for managing a Git commit message template within the current project.

  • Optional issue reference
  • Optional Co-authored-by line

Installation

With Go:

go install github.com/carhartl/git-commit-template

Via Homebrew:

brew install carhartl/tap/git-commit-template

Usage

Pass issue ref numbers with or without prefix:

git-commit-template set --issue 123 --dry-run
git-commit-template set --issue #123 --dry-run

Produces:

Subject (keep under 50 characters)

Context/description (what and why)

Addresses: #123

Pass co-author with fuzzy matching entries in author file:

echo 'John Doe <john@example.com>' >> $HOME/.git-commit-template-authors
echo 'Mary Tester <mary@example.com>' >> $HOME/.git-commit-template-authors
git-commit-template set --pair doe --dry-run

Produces:

Subject (keep under 50 characters)

Context/description (what and why)

Co-authored-by: John Doe <john@example.com>

Tip:

Due to the executable's naming you can also call it like so:

git commit-template ...

Configuration

Env var Default
GIT_COMMIT_TEMPLATE_ISSUE_PREFIX #
GIT_COMMIT_TEMPLATE_AUTHOR_FILE $HOME/.git-commit-template-authors

Releasing

op run --env-file .env -- ./release.sh 0.1.0

Also see

https://cbea.ms/git-commit/

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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