git-workflow

Standardize Git branching, commits, and pull request workflows.

53|1|Updated Dec 18, 2025
One-click install
npx skills add https://github.com/cosmix/claude-code-setup --skill git-workflow-cosmix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-workflow
Source: https://github.com/cosmix/claude-code-setup/tree/main/skills/git-workflow
Command: npx skills add https://github.com/cosmix/claude-code-setup --skill git-workflow-cosmix

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides best practices for branching, commit hygiene, merging, and collaboration workflows to keep history clean.

Core Features & Use Cases

  • Branching Conventions: Consistent naming and lifecycle.
  • Commit Practices: Atomic commits with meaningful messages.
  • PR & Review: Structured review processes and conflict resolution.

Quick Start

Establish a feature-branch workflow with conventional commits and PR reviews.

Frequently Asked Questions about git-workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a Git workflow with feature branches and pull requests?

Feature-branch workflows isolate work by creating short-lived branches for each task, then merging via pull requests after review. This keeps the main branch stable and enables team collaboration. Start by establishing branch naming conventions, writing atomic commits with meaningful messages, and requiring PR reviews before merge.

What's the best way to write commit messages in Git?

Atomic commits paired with conventional commit syntax—prefixing messages with type (feat, fix, docs) and describing changes clearly—make history readable and enable automated tooling. Each commit should represent one logical change, not multiple unrelated fixes bundled together.

How do I resolve merge conflicts in Git?

Merge conflicts occur when parallel branches modify the same lines. Resolve by examining conflicted sections, choosing or combining versions, then staging and committing the result. Rebase workflows prevent conflicts earlier by keeping branches short-lived and frequently synchronized with main.

Should I rebase or merge when integrating feature branches?

Merge preserves complete history and is safer for shared branches; rebase rewrites history for a linear, cleaner log but should only apply to local or short-lived branches. Teams typically merge via pull requests to maintain traceability and enable reviews.

What branch protection rules should I enforce in Git?

Branch protection prevents accidental overwrites by requiring pull request reviews, passing status checks, and dismissing stale reviews before merging. It enforces consistent workflow across teams and maintains history integrity.

How do I keep my Git history clean and organized?

Enforce atomic commits, use conventional commit syntax, delete merged branches promptly, and avoid force-pushing to shared branches. Squashing or rebasing feature branches before merge removes intermediate commits, keeping the main branch history focused and readable.