Commit Workflow
Perform the full commit-PR-merge cycle.
Steps
- •
Check current state:
bashgit status git diff --stat git log --oneline -5
- •
Create branch:
git checkout -b [descriptive-branch-name] - •
Stage files:
- •Stage specific files (never
git add -A) - •Exclude:
settings.local.json,.env, credentials, large data files - •Review what's being staged
- •Stage specific files (never
- •
Commit:
- •Use
$ARGUMENTSas commit message if provided - •Otherwise, analyze changes and write a descriptive message
- •Format: imperative mood, concise, explains WHY not WHAT
- •Use
- •
Push and create PR:
bashgit push -u origin [branch-name] gh pr create --title "[message]" --body "[summary of changes]"
- •
Merge (with user approval):
bashgh pr merge --merge --delete-branch git checkout main git pull
Important
- •Never commit directly to main
- •Never use
git add -Aorgit add . - •Never commit sensitive files
- •Always review staged changes before committing