
Git Workflow
Pick and implement a team Git branching model, PR habits, and release rhythm on GitHub, GitLab, or Bitbucket.
Install
npx skills add https://github.com/bagelhole/devops-security-agent-skills --skill git-workflowWhat is this skill?
- Compares trunk-based development, GitFlow, and GitHub Flow with when-to-use guidance
- Documents short-lived feature branches with rebase-onto-main and same-day merge discipline
- Covers establishing PR processes and release management for hosted Git remotes
- Targets teams improving collaboration and review practices, not one-off commits
Adoption & trust: 1 installs on skills.sh; 30 GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
Recommended Skills
Journey fit
Shipping safely depends on how code merges and releases; the canonical shelf is Ship because branching and PR policy gate what reaches production. Review is where pull-request workflow, trunk vs GitFlow choices, and code-review norms are defined before launch cadence kicks in.
Common Questions / FAQ
Is Git Workflow safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Git Workflow
# Git Workflow Implement effective branching strategies and pull request workflows for team collaboration. ## When to Use This Skill Use this skill when: - Establishing team Git workflows - Implementing branching strategies - Configuring pull request processes - Setting up release management - Improving code review practices ## Prerequisites - Git installed - Repository hosting (GitHub, GitLab, Bitbucket) - Basic Git knowledge ## Branching Strategies ### Trunk-Based Development Best for: Continuous deployment, small teams, mature CI/CD ``` main ─────●─────●─────●─────●─────●─────●─────● │ │ │ │ │ │ └─● └─● └─● └─● └─● └─● feature branches (short-lived) ``` ```bash # Create short-lived feature branch git checkout main git pull origin main git checkout -b feature/add-login # Work and commit frequently git add . git commit -m "feat: add login form" # Keep branch updated git fetch origin git rebase origin/main # Merge quickly (same day ideally) git checkout main git pull origin main git merge feature/add-login git push origin main git branch -d feature/add-login ``` ### GitHub Flow Best for: Continuous delivery, web applications ``` main ─────●─────●───────────●─────────────●─────● │ ↑ ↑ ↑ └───●───●───┘ │ │ feature/login │ │ │ │ └───●───●───●───●───────┘ │ feature/dashboard │ │ └───●─────────────────────────┘ hotfix/security-patch ``` ```bash # Create feature branch from main git checkout main git pull origin main git checkout -b feature/user-dashboard # Push and create PR git push -u origin feature/user-dashboard # After review, merge via PR (squash recommended) # Delete branch after merge ``` ### GitFlow Best for: Scheduled releases, versioned products ``` main ────────●────────────────●──────────────● ↑ ↑ ↑ release ────────┼────●───●──────┼──────────────┼ │ │ │ │ │ develop ───●────●────┼───●──●───●───●───●───●──┼ │ │ │ │ │ │ feature ───┴─────────┘ │ │ │ │ │ │ │ │ hotfix ────────────────────┴───────┼───┼──────┘ │ │ feature ────────────────────────────┴───┘ ``` ```bash # Initialize GitFlow git flow init # Start feature git flow feature start user-auth # Finish feature (merges to develop) git flow feature finish user-auth # Start release git flow release start 1.0.0 # Finish release (merges to main and develop) git flow release finish 1.0.0 # Hotfix git flow hotfix start security-fix git flow hotfix finish security-fix ``` ## Commit Conventions ### Conventional Commits ``` <type>(<scope>): <description> [optional body] [optional footer(s)] ``` Types: - `feat`: New feature - `fix`: Bug fix - `docs`: Documentation - `style`: Formatting - `refactor`: Code restructuring - `test`: Adding tests - `chore`: Maintenance Examples: ```bash git commit -m "feat(auth): add OAuth2 login support" git commit -m "fix(api): handle null response from payment service" git commit -m "docs: update API documentation for v2 endpoints" git commit -m "refactor(db): optimize user query performance" # Breaking change git commit -m "feat(api)!: change response format for user endpoint BREAKING CHANGE: The user endpoint now returns an object instead of