Create a commit with the specified type prefix.
Arguments
- •
$ARGUMENTS- Optional: "bugfix" or "breaking" (default: "task")
Instructions
- •Run
git statusto see changes - •Run
git diffandgit diff --stagedto understand what changed - •Stage relevant files (prefer specific files over
git add -A) - •Determine commit type from argument:
- •"bugfix" or "fix" →
[BUGFIX] - •"breaking" →
[BREAKING] - •anything else (including empty) →
[TASK]
- •"bugfix" or "fix" →
- •Extract ticket number from branch name if present (e.g.,
feature/ABC-817-...→#ABC-817) - •Check if GPG signing is available:
git config --get user.signingkey- •If key exists: use
-Sflag - •If no key: commit without
-S
- •If key exists: use
- •Create commit with format:
Do NOT add Co-Authored-By or any other trailer.code
[TYPE] #TICKET: Brief description
- •Show result with
git log -1