git-workflow
Git best practices and workflows including conventional commits, branching strategies, and collaboration patterns.
When & Why to Use This Skill
This Claude skill streamlines version control management by enforcing Git best practices, including conventional commit standards, structured branching strategies, and efficient collaboration patterns. It helps development teams maintain a clean, readable project history, automate changelog generation, and improve code review workflows through standardized repository hygiene and professional documentation practices.
Use Cases
- Standardizing commit messages using the Conventional Commits specification to enable automated versioning and semantic changelog generation.
- Implementing structured branch naming conventions (e.g., feature/, fix/, hotfix/) to improve traceability between code changes and project management tickets.
- Optimizing repository hygiene by configuring comprehensive .gitignore files and utilizing Git hooks to prevent sensitive data leaks and ensure code quality before commits.
- Facilitating smoother team collaboration through atomic commits and rebase-based workflows that minimize merge conflicts and simplify the code review process.
| name | git-workflow |
|---|---|
| description | Git best practices and workflows including conventional commits, branching strategies, and collaboration patterns. |
| globs | ["**/.git/**", "**/.gitignore", "**/.gitattributes"] |
| alwaysApply | ["**/CONTRIBUTING.md", "**/CHANGELOG.md"] |
| priority | 80 |
| tags | ["workflow"] |
Git Workflow Best Practices
Commit Messages (Conventional Commits)
- feat: New feature
- fix: Bug fix
- docs: Documentation
- style: Formatting
- refactor: Code restructuring
- test: Adding tests
- chore: Maintenance
Format: type(scope): description Example: feat(auth): add password reset flow
Branch Naming
- feature/TICKET-description
- fix/TICKET-description
- hotfix/description
- release/v1.0.0
- docs/description
Workflow
- Keep commits atomic and focused
- Rebase feature branches on main
- Squash WIP commits before merge
- Never force push to shared branches
- Use pull request templates
- Require code reviews
.gitignore
- Ignore build artifacts
- Ignore node_modules, venv, target
- Ignore local config (.env.local)
- Ignore IDE settings (.idea, .vscode)
- Ignore OS files (.DS_Store)
Advanced
- Use git hooks with husky/pre-commit
- Sign commits with GPG
- Use git-crypt for secrets
- Bisect for finding bugs