🏹 A CLI tool to either run multiple git commit related commands in one go, or use an interactive commit UI to follow a commit convention.
Find a file
2024-12-09 18:30:40 -05:00
.github/workflows ci: add release.yml 2023-11-29 09:36:52 -05:00
src feat: add -c (copy to clipboard) and -s (sign) 2024-12-09 18:22:04 -05:00
.gitignore feat: initial commit 2023-11-29 09:18:39 -05:00
Cargo.lock feat: add -c (copy to clipboard) and -s (sign) 2024-12-09 18:22:04 -05:00
Cargo.toml feat: add -c (copy to clipboard) and -s (sign) 2024-12-09 18:22:04 -05:00
demo.gif docs: update demo.gif to using v0.1.3 & smaller file size 2023-11-29 22:30:04 -05:00
README.md docs: remove tech stack section from README 2024-12-09 18:30:40 -05:00

commit-helper (ch)

A command-line tool to help run commands related to git commit in one go or use an interactive commit message builder.

Demo

Installation

Make sure you have Cargo installed, then run the following command in your terminal:

cargo install --git https://github.com/rzmk/commit-helper

Reference

To run the interactive workflow, run ch in your terminal:

ch

--help or -h

To get the help message, run ch --help or ch -h:

ch -h

--add or -a

If you want to run git add -A before committing, use the --add or -a flag:

ch -a

--push or -p

If you want to run git push after committing, use the --push or -p flag:

ch -p

--message or -m

If you want to pass in a custom commit message (therefore skipping the interactive steps), use the --message or -m flag:

ch -m "feat: add new feature"

--clipboard or -c

If you want to copy the commit message to your clipboard and skip committing and pushing:

ch -c

--debug or -d

If you want to see the debug output, use the --debug or -d flag:

ch -d

Note: The debug output will not be printed if you use the --dry-run flag.

--dry-run

If you want to do a dry run without executing any commands, use the --dry-run flag:

ch --dry-run

--sign or -s

If you want to run the -S flag when using git commit:

ch -s

Example

If I want to run git add -A, then git commit -m "feat: add new feature", then git push all in one go, I could run the following command:

ch -m "feat: add new feature" -a -p

Equivalently to the above command, I may instead combine the short flags:

ch -apm "feat: add new feature"

Note: The order of the combined short flags does not matter, except for the -m flag, which must be the last flag if you want to pass in a custom commit message after a combination of flags.