git-workflow-designer
from eddiebe147/claude-settings
No description
6 stars1 forksUpdated Jan 22, 2026
npx skills add https://github.com/eddiebe147/claude-settings --skill git-workflow-designerSKILL.md
Git Workflow Designer Skill
Overview
This skill helps you design and implement effective Git branching strategies for teams of any size. Covers Git Flow, GitHub Flow, trunk-based development, release management, and branch protection policies.
Workflow Selection Philosophy
Key Factors
- Team size: Solo vs. small team vs. large organization
- Release frequency: Continuous vs. scheduled releases
- Environment complexity: Single vs. multiple deployment targets
- Risk tolerance: Move fast vs. stability first
Workflow Comparison
| Workflow | Best For | Release Frequency | Complexity |
|---|---|---|---|
| Trunk-Based | Small teams, CI/CD | Continuous | Low |
| GitHub Flow | Most web apps | On-demand | Low |
| Git Flow | Versioned software | Scheduled | High |
| GitLab Flow | Environment-based | Mixed | Medium |
GitHub Flow (Recommended for Most)
Overview
Simple, effective workflow for continuous deployment.
main ─────●─────●─────●─────●─────●─────●
\ / \ /
feature/x ●─────● ●─────●
Process
-
Branch from main
git checkout main git pull origin main git checkout -b feature/user-authentication -
Commit regularly
git add . git commit -m "feat: add login form component" -
Push and create PR
git push -u origin feature/user-authentication gh pr create --title "Add user authentication" --body "..." -
Review and merge
- CI runs tests
- Peer review
- Squash merge to main
-
Deploy
- Automatic deploy on merge to main
Branch Naming Convention
feature/ - New features
fix/ - Bug fixes
docs/ - Documentation
refactor/ - Code refactoring
test/ - Test additions
chore/ - Maintenance tasks
Configuration
# .github/branch-protection.yml (pseudo-config)
main:
required_status_checks:
strict: true
contexts:
- "ci/tests"
- "ci/lint"
- "ci/build"
required_pull_request_reviews:
required_approving_review_count: 1
dismiss_stale_reviews: true
enforce_admins: false
restrictions: null
Git Flow (For Versioned Releases)
Overview
Structured workflow for scheduled release cycles.
main ─────●─────────────────●─────────────●
\ / \
release ●─────●─────●─ ●───
\ \ / /
develop ●─────●─●─────●─●─────●─────●─────●─●
\ / \ / \ /
feature ●─● ●─────● ●─────●
Branches
| Branch | Purpose | Merges To |
|---|---|---|
main | Production-ready code | - |
develop | Integration branch | main |
feature/* | New features | develop |
release/* | Release preparation | main, develop |
hotfix/* | Emergency fixes | main, develop |
Feature Development
# Start feature
git checkout develop
git pull origin develop
git checkout -b feature/new-dashboard
# Work on feature
git commit -m "feat: add dashboard layout"
git commit -m "feat: add dashboard charts"
# Complete feature
git checkout develop
git merge --no-ff feature/new-dashboard
git branch -d feature/new-dashboard
git push origin develop
Release Process
# Start release
git checkout develop
git checkout -b release/1.2.0
# Bump version
npm version 1.2.0 --no-git-tag-version
git commit -am "chore: bump version to 1.2.0"
# Fix release issues
git commit -m "fix: correct typo in release notes"
# Complete release
git checkout main
git merge --no-ff release/1.2.0
git tag -a v1.2.0 -m "Release 1.2.0"
git push origin main --tags
git checkout develop
git merge --no-ff release/1.2.0
git push origin develop
git branch -d release/1.2.0
Hotfix Process
# Start hotfix
git checkout main
git checkout -b hotfix/1.2.1
# Fix the issue
git commit -m "fix: critical security vulnerability"
# Complete hotfix
git checkout main
git merge --no-ff hotfix/1.2.1
git tag -a v1.2.1 -m "Hotfix 1.2.1"
git push origin main --tags
git checkout develop
git merge --no-ff hotfix/1.2.1
git push origin develop
git branch -d hotfix/1.2.1
Trunk-Based Development
Overview
Everyone commits to main with short-lived branches.
main ─●─●─●─●─●─●─●─●─●─●─●─●─●─●─●─●
\─/ \─/ \─/
PR PR PR
Principles
- Short-lived branches (< 1 day)
- Small, frequent commits
- Feature flags for incomplete work
- Comprehensive CI/CD
Feature Flags Integration
// src/lib/features.ts
export const features = {
newCheckout: process.env.FEATURE_NEW_CHECKOUT === 'true',
darkMode: process.env.FEATURE_DARK_MODE === 'true',
};
// Usage
if (features.newCheckout) {
return <NewCheckout />;
}
return <OldCheckout />;
Branch Rules
# Quick feature (< 4 hours)
gi
...
Repository Stats
Stars6
Forks1