From ai-dev
Knowledge and patterns for Git workflows with emphasis on trunk-based development for rapid iteration.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai-dev:managing-gitThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill provides patterns and best practices for Git workflows, with trunk-based development as the primary approach.
This skill provides patterns and best practices for Git workflows, with trunk-based development as the primary approach.
This plugin emphasizes trunk-based development (TBD) where:
main ────●────●────●────●────●────▶
│ │ │ │ │
Small, tested commits
/ai-dev:commit-push for quality gatesWhen PRs are required (team policy, compliance):
main
│
├── feature/add-auth ──────┐
│ │ PR
├──────────────────────────┘
For projects requiring release branches (enterprise):
main ────────────────────────────────────────▶
│ ▲
├── release/1.0 ──────────────────────┤
develop ──┴─────────────────────────────┴───▶
<type>(<scope>): <description>
[optional body]
[optional footer]
| Type | Description |
|---|---|
feat | New feature |
fix | Bug fix |
docs | Documentation only |
style | Formatting, no code change |
refactor | Neither fix nor feature |
perf | Performance improvement |
test | Adding tests |
chore | Maintenance tasks |
ci | CI/CD changes |
feat(auth): add password reset flow
Implement password reset via email with secure tokens.
Tokens expire after 24 hours.
Closes #123
fix(api): handle null response from payment service
The payment service can return null for cancelled transactions.
Added null check and appropriate error handling.
# Start work
git checkout main
git pull origin main
git checkout -b feature/my-feature
# During work
git add .
git commit -m "feat: implement feature"
# Sync with main
git fetch origin
git rebase origin/main
# Push
git push -u origin feature/my-feature
# Undo last commit (keep changes)
git reset --soft HEAD~1
# Undo last commit (discard changes)
git reset --hard HEAD~1
# Amend last commit
git commit --amend -m "new message"
# Undo staged changes
git restore --staged <file>
# Undo working directory changes
git restore <file>
# View history
git log --oneline -20
# View changes
git diff HEAD~1
git diff --cached # staged changes
# Find who changed a line
git blame <file>
# Search commits
git log --grep="keyword"
git log -S "code" # search for code
# List branches
git branch -a
# Delete branch
git branch -d feature/done
git push origin --delete feature/done
# Rename branch
git branch -m old-name new-name
git checkout main
git merge feature/branch
git checkout feature/branch
git rebase main
git rebase -i HEAD~3
Commands:
pick - Keep commitreword - Change messageedit - Pause for amendmentssquash - Combine with previousfixup - Combine, discard messagedrop - Remove commit# Apply specific commit
git cherry-pick abc1234
# Apply without committing
git cherry-pick --no-commit abc1234
# Stash changes
git stash
git stash push -m "work in progress"
# List stashes
git stash list
# Apply stash
git stash pop # apply and remove
git stash apply # apply and keep
# Drop stash
git stash drop stash@{0}
# Create tag
git tag v1.0.0
git tag -a v1.0.0 -m "Release 1.0.0"
# Push tags
git push origin v1.0.0
git push origin --tags
# List tags
git tag -l "v1.*"
# Dependencies
node_modules/
.venv/
__pycache__/
# Build output
dist/
build/
*.egg-info/
# IDE
.idea/
.vscode/
*.swp
# Environment
.env
.env.local
*.local
# OS
.DS_Store
Thumbs.db
# Logs
*.log
logs/
# Coverage
coverage/
.coverage
htmlcov/
npx claudepluginhub drewdresser/ai-dev-settings --plugin ai-devGuides Git branching strategies (GitHub Flow, trunk-based, GitFlow), commit conventions, merge vs rebase, conflict resolution, and collaborative development best practices.
Guides Git workflows with branching strategies (GitHub Flow, Git Flow), conventional commit messages, branch naming, PR templates, and operations like rebase. Use for Git ops, commits, branches, team workflows.
Provides Git workflow patterns including branching strategies, commit conventions, merge vs rebase, and conflict resolution for teams of all sizes.