Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/carhartl/git-commit-template
Command-line utility for managing a Git commit message template within the current project.
https://github.com/carhartl/git-commit-template
cli git productivity
Last synced: 26 days ago
JSON representation
Command-line utility for managing a Git commit message template within the current project.
- Host: GitHub
- URL: https://github.com/carhartl/git-commit-template
- Owner: carhartl
- License: mit
- Created: 2023-05-31T08:19:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-30T05:22:41.000Z (3 months ago)
- Last Synced: 2024-07-30T08:51:54.507Z (3 months ago)
- Topics: cli, git, productivity
- Language: Go
- Homepage:
- Size: 120 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# git-commit-template
[![CI](https://github.com/carhartl/git-commit-template/actions/workflows/ci.yml/badge.svg)](https://github.com/carhartl/git-commit-template/actions/workflows/ci.yml)
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](https://golang.org/):
```bash
go install github.com/carhartl/git-commit-template/cmd/git-commit-template
```Via [Homebrew](https://brew.sh/):
```bash
brew install carhartl/tap/git-commit-template
```## Usage
Pass issue ref numbers with or without prefix:
```bash
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:
```bash
echo 'John Doe ' >> $HOME/.git-commit-template-authors
echo 'Mary Tester ' >> $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
```Multiple co-authors:
```bash
git-commit-template set --pair doe --pair mary --dry-run
```Produces:
```
Subject (keep under 50 characters)Context/description (what and why)
Co-authored-by: John Doe
Co-authored-by: Mary Tester
```Tip:
Due to the executable's naming you can also call it like so:
```bash
git commit-template ...
```E.g. use with your favorite Git alias...
## Configuration
| Env var | Default |
| ---------------------------------- | ------------------------------------ |
| `GIT_COMMIT_TEMPLATE_ISSUE_PREFIX` | `#` |
| `GIT_COMMIT_TEMPLATE_AUTHOR_FILE` | `$HOME/.git-commit-template-authors` |## Releasing
```bash
op run --env-file .env -- ./release.sh 0.1.0
```## Also see
https://cbea.ms/git-commit/