Skip to content

Comments

feat: add auto-commit functionality with customizable git commit args#21

Open
staryxchen wants to merge 1 commit intofslongjin:masterfrom
staryxchen:feat-add-auto-commit
Open

feat: add auto-commit functionality with customizable git commit args#21
staryxchen wants to merge 1 commit intofslongjin:masterfrom
staryxchen:feat-add-auto-commit

Conversation

@staryxchen
Copy link
Contributor

@staryxchen staryxchen commented Feb 18, 2026

Changes

  • Add --commit / -c CLI flag to automatically run git commit after generating the commit message
  • Add --commit-args CLI option to pass extra arguments to git commit (e.g. -s, --no-verify), supports hyphen-prefixed values
  • Add auto_commit and commit_args fields in config file for persistent defaults
  • CLI args take priority over config file settings
  • Auto-commit is supported in both default (commit message) and combined (branch + message) modes
  • Success/failure feedback is printed to stderr

Usage

# Generate and auto-commit
fastcommit -c

# Auto-commit with extra git args
fastcommit -c --commit-args "-s" --commit-args "--no-verify"

Config file (~/.fastcommit/config.toml):

auto_commit = true
commit_args = ["-s"]

Fastcommit is now truly “fast.”

- Add `--commit` and `--commit-args` CLI options
- Add `auto_commit` and `commit_args` config fields
- Execute `git commit` automatically after message generation

Signed-off-by: staryxchen <staryxchen@tencent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant