| name | git-workflow |
| description | Git workflow patterns and best practices |
| triggers | ["context","git","commit","branch","pr"] |
Git Workflow Skill
Purpose: Apply professional Git workflows and conventions
Overview
This skill provides Git workflow patterns for professional software development teams.
Branch Strategy
GitFlow
main ──●────────────────●──────────●──→
↑ ↑
release ──●─┘ ●─┘
↑ ↑
develop ──●──●──●──●──●──●──●──●──●──→
↑ ↑
feature ───●─────●
Trunk-Based
main ──●──●──●──●──●──●──●──●──→
↑ ↑
short ───● ● (< 1 day)
feature
Branch Naming
feature/ABC-123-add-user-auth
bugfix/ABC-456-fix-login-error
hotfix/ABC-789-critical-security-patch
release/v1.2.0
chore/update-dependencies
Conventional Commits
Format
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
Types
| Type | Usage |
|---|
feat | New feature |
fix | Bug fix |
docs | Documentation |
style | Formatting |
refactor | Code restructure |
test | Adding tests |
chore | Maintenance |
perf | Performance |
ci | CI/CD changes |
Examples
feat(auth): add JWT refresh token support
fix(api): handle null user in profile endpoint
Closes
docs(readme): add installation instructions
chore(deps): update dependencies to latest versions
Pull Request Template
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Checklist
- [ ] Tests pass locally
- [ ] Code follows style guidelines
- [ ] Self-reviewed my code
- [ ] Added necessary documentation
- [ ] No new warnings
## Testing
How to test these changes
Common Commands
git checkout -b feature/ABC-123-new-feature
git add -p
git commit -m "feat: add..."
git fetch origin
git rebase origin/main
git rebase -i HEAD~3
git push origin feature/ABC-123-new-feature
Quick Reference
| Command | Usage |
|---|
git log --oneline -10 | Recent commits |
git diff --staged | Staged changes |
git stash | Temporary storage |
git cherry-pick <sha> | Pick specific commit |
git bisect | Find bad commit |
git reflog | Recovery tool |