Commit Process Guide (Non-Interactive)
Follow this guide to make commits that integrate with Marty's workflow and changelog system. All operations are command-line only — no interactive editors.
Commit Message Format
All commits MUST use Conventional Commits format:
<type>(<scope>): <description>
Co-Authored-By: martyy-code <nesalia.inc@gmail.com>
Type Categories
| Type | When to Use | Appears in Changelog |
|---|---|---|
feat |
New feature | Yes (Features section) |
fix |
Bug fix | Yes (Bug Fixes section) |
docs |
Documentation changes | Yes (Documentation section) |
refactor |
Code refactoring | Yes (Code Refactoring section) |
perf |
Performance improvement | Yes (Performance Improvements section) |
test |
Adding or updating tests | No |
chore |
Maintenance, tooling | No |
style |
Formatting, no code change | No |
ci |
CI/CD changes | No |
Scope (Optional but Recommended)
Approved scopes: skills, docs, ci, agents, auth, api, cli, config, deps, other
If your change doesn't fit, omit the scope.
Description Rules
- Use imperative mood: "add" not "added" or "adds"
- Lowercase first letter, no period at end
- Under 72 characters
Branch Strategy
When to Create a Branch
| Change Type | Branch Required? |
|---|---|
| Hotfix (1-liner, trivial) | No — commit directly on main |
| Bug fix (non-trivial) | Yes |
| Small/Large feature | Yes |
| Refactor (major) | Yes |
| Docs only | Yes |
Branch Naming
<type>/<short-description>
Non-Interactive Commit Workflow
Full Workflow (Single Command)
# Complete workflow: create branch, commit, push
git checkout -b feat/my-feature && git add -A && git commit -m "feat(scope): description
Co-Authored-By: \${GIT_AUTHOR_EMAIL:-martyy-code <nesalia.inc@gmail.com>}" && git push -u origin HEAD
Step-by-Step Commands
1. Create branch:
git checkout -b <type>/<short-description>
2. Stage all changes:
git add -A
3. Commit (single line, no editor):
git commit -m "feat(skills): add new feature
Co-Authored-By: martyy-code <nesalia.inc@gmail.com>"
4. Push:
git push -u origin HEAD
Quick Commit Template
Copy this pattern:
git commit -m "<type>(<scope>): <description>
Co-Authored-By: martyy-code <nesalia.inc@gmail.com>"
Fixup (Non-Interactive)
After push, use --fixup for clean history without interactive rebase:
# Mark as fixup of a specific commit
git commit --fixup=<commit-hash> -m "fix(scope): correct issue
Co-Authored-By: martyy-code <nesalia.inc@gmail.com>"
# Later, autosquash all fixups
git rebase -i --autosquash HEAD~N
Note: For automated workflows, prefer direct commits over fixup to avoid interactive rebase.
Amend (Non-Interactive)
# Amend last commit message or add forgotten changes
git add -A && git commit --amend --no-edit
Warning: Only amend commits that haven't been pushed to shared branches.
Stashing (Switching Contexts)
If you need to switch branches or set aside changes temporarily:
# Save work in progress
git stash push -m "work in progress on feature X"
# Later, restore work
git stash pop
# List stashes
git stash list
When Nothing to Commit
If git status shows no changes:
- Verify with
git diff(untracked files won't show here) - Use
git log --oneline -3to confirm you're on the right branch - If files are untracked, you need to
git addthem first before committing
Breaking Changes
git commit -m "feat(auth)!: change token format
BREAKING CHANGE: Token payload structure changed.
Users must re-authenticate.
Co-Authored-By: martyy-code <nesalia.inc@gmail.com>"
Commit Message Examples
Feature:
git commit -m "feat(auth): add refresh token rotation
- Supports staging and production targets
- Runs pre-deployment checks
- Creates deployment PR for review
Closes #45
Co-Authored-By: martyy-code <nesalia.inc@gmail.com>"
Bug Fix:
git commit -m "fix(auth): correct token refresh race condition
When multiple requests hit the token refresh endpoint
simultaneously, only one was being processed.
Now uses mutex lock to ensure single refresh.
Fixes #123
Co-Authored-By: martyy-code <nesalia.inc@gmail.com>"
Refactor:
git commit -m "refactor(agents): extract memory module
Extracted memory persistence logic to separate module for:
- Easier testing
- Reusability across agents
- Clearer separation of concerns
No functional changes.
Co-Authored-By: martyy-code <nesalia.inc@gmail.com>"
Chore:
git commit -m "chore(deps): update dependencies to latest versions
Co-Authored-By: martyy-code <nesalia.inc@gmail.com>"
Common Mistakes to Avoid
- No interactive editors: Always use
-mflag, never let git open an editor - Missing Co-Authored-By: Every commit MUST include it
- Wrong type: Don't use
featfor chore work - Vague messages: "update", "fix bug" are not acceptable
- Missing reference: Link to issue/RFC in footer
Pre-Commit Validation
Before committing, run:
# Check current state
git status
# View diff of staged changes
git diff --cached
Quick Reference
Format: git commit -m "<type>(<scope>): <desc>
Co-Authored-By: martyy-code <nesalia.inc@gmail.com>"
Types: feat | fix | docs | refactor | perf | test | chore | style | ci
Scopes: skills | docs | ci | agents | auth | api | cli | config | deps | other
Example:
git commit -m "feat(auth): add OAuth2 support
Co-Authored-By: martyy-code <nesalia.inc@gmail.com>"
Integration with Changelog
Commits using conventional format are automatically parsed by the changelog GitHub Action on merge to main. Write clear, conventional commits — the automated system handles CHANGELOG.md.