Cursor Git Commit
Overview
Use a consistent commit workflow: inspect changes, stage intentionally, and avoid committing noise.
Checklist (run before committing)
- •Inspect status:
git status --porcelain - •Review diffs:
- •unstaged:
git diff --stat - •staged:
git diff --cached --stat
- •unstaged:
- •Stage intentionally:
git add path/to/file ... - •Verify staged set:
git diff --cached --name-only - •Commit and record hash:
- •
git commit -m "..."thengit rev-parse HEAD
- •
Fix common mistakes
- •Unstage one file:
git reset HEAD path/to/file - •Unstage everything:
git reset HEAD - •Remove noise already committed (keep on disk):
git rm --cached path/to/noisethen add to.gitignoreandgit commit --amend --no-edit
Reference
- •Full checklist + ignore guidance:
references/git-commit-instructions.md.