git-workflow
Git best practices, branching strategies, commit conventions, and PR workflows. Use when reviewing git history, writing commits, setting up branching strategy, or improving git practices. Triggers on "git best practices", "commit message", "branching strategy", or "PR workflow".
By asyrafhussin · 629 installs
npx skills add asyrafhussin/agent-skills --skill git-workflow
Source repository · Upstream listing
Git Workflow
Git best practices, commit conventions, branching strategies, and pull request workflows. Guidelines for maintaining a clean, useful git history.
When to Apply
Reference these guidelines when:
Writing commit messages
Creating branches
Setting up git workflows
Reviewing pull requests
Maintaining git history
Rule Categories by Priority
Priority Category Impact Prefix
1 Commit Messages CRITICAL commit
2 Branching Strategy HIGH branch
3 Pull Requests HIGH pr
4 History Management MEDIUM history
5 Collaboration MEDIUM collab
Quick Reference
1. Commit Messages (CRITICAL)
commit conventional Use conventional commits
commit atomic Atomic commits (one logical change)
commit present tense Use imperative present tense
commit meaningful Descriptive, meaningful messages
commit body Add body for complex changes
commit references Reference issues/tickets
commit git hooks Enforce standards with Husky + commitlint
2. Branching Strategy (HIGH)
branch naming Consistent branch naming
branch feature Feature branch workflow
branch main protected Protect main branch
branch short lived Keep branches short lived
branch delete merged Delete merged branches
branch release Release branch strategy
branch workflow strategies GitFlow vs GitHub Flow vs Trunk Based
branch monorepo Monorepo git workflows
3. Pull Requests (HIGH)
pr small Keep PRs small and focused
pr description Write clear descriptions
pr reviewers Request appropriate reviewers
pr ci pass Ensure CI passes
pr squash Squash when appropriate
pr draft Use draft PRs for WIP and early feedback
4. History Management (MEDIUM)
history rebase Rebase vs merge
history no force push Avoid force push to shared branches
history clean Keep history clean
history tags Use tags for releases
history worktree Work on multiple branches with git worktree
5. Collaboration (MEDIUM)
collab code review Effective code reviews
collab conflicts Handle merge conflicts
collab communication Communicate changes
collab gitignore .gitignore best practices
Essential Guidelines
Conventional Commits
Types
Type Description
feat New feature
fix Bug fix
docs Documentation only
style Formatting, no code change
refactor Code change, no feature/fix
perf Performance improvement
test Adding/updating tests
chore Maintenance, dependencies
ci CI/CD changes
build Build system changes
revert Revert previous commit
Examples
Branch Naming
Branch Workflow
Atomic Commits
Commit Frequently, Push Regularly
Pull Request Best Practices
PR Title
PR Description Template
Keep PRs Small
Rebase vs Merge
Interactive Rebase (Clean Up)
Handling Conflicts
Git Hooks
Tagging Releases
.gitignore Best Practices
Useful Git Commands
Output Format
When reviewing git practices, output findings:
Example:
How to Use
Read individual rule files for detailed explanations:
References
[Git Official Documentation](https://git scm.com/doc) Comprehensive Git documentation
[Pro Git Book](https://git scm.com/book/en/v2) The complete Pro Git book
[Conventional Commits](https://www.conventionalcommits.org) Commit message specification
[GitHub Flow](https://docs.github.com/en/get started/quickstart/github flow) Lightweight workflow
[How to Write a Git Commit Message](https://chris.beams.io/posts/git commit/) Commit message guide
[Google Code Review Practices](https://google.github.io/eng practices/review/) Code review best practices
Examples from Well Known Projects
Learn from projects with excellent git practices:
Linux Kernel Detailed commit messages and patch workflow
React Conventional commits and thorough PR reviews
Vue.js Clean commit history and good PR templates
TypeScript Structured branching and clear release process
Next.js Conventional commits and automated releases
Configuration Examples
Commitlint
Husky Git Hooks
GitHub PR Template
Metadata
Skill Version: 1.2.0
Last Updated: 2026 03 08
Total Rules: 31
Categories: 5 (Commit Messages, Branching Strategy, Pull Requests, History Management, Collaboration)
Compatible With:
Git 2.0+
GitHub, GitLab, Bitbucket, Azure DevOps
Recommended Tools:
[Git](https://git scm.com/) Version control system
[GitHub CLI](https://cli.github.com/) GitHub command line tool
[Commitlint](https://commitlint.js.org/) Commit message linter
[Husky](https://typicode.github.io/husky/) Git hooks
[Semantic Release](https://semantic release.gitbook.io/) Automated versioning
License
MIT License. This skill is provided as is for educational and development purposes.