Commit

Commit whatever is currently staged — commit only, no push. Use when the user says "commit", "commit this", "commit the staged changes". Does not stage anything and does not push. For committing AND pushing, use commit-and-push instead.

ProstDev d71a4d1 1.1 KB Updated

File contents

Commit

Commit the currently staged changes. Commit only — do not push. Do not git add, do not stage untracked or unstaged files.

Steps

  1. git diff --cached --stat — confirm something is staged. If nothing is staged, stop and tell the user there's nothing to commit (don't stage anything for them).
  2. Write a short commit message from the staged diff: a type: summary line, where type is a conventional-commit prefix inferred from the change (feat, fix, docs, refactor, test, chore, style, perf, build, ci) and the summary is imperative.
  3. git commit with that message (staged changes only — no -a, no path args).
  4. Report the commit hash and message.

Don't

  • Don't push.
  • Don't stage anything (git add, git commit -a, git commit <path>).
  • Don't amend, rebase, or force-push.
  • Don't touch other branches or open a PR.

ProstDev/skills/tree/main/plugins/dev/skills/commit commit d71a4d1f6d

Frequently asked questions

npx skillmds@latest add prostdev/commit