agentsclimarketplace

Git workflow

Skill krzysztofsurdy/code-virtuoso/skills/knowledge/git-workflow

Skills, sub-agents, and playbooks for Claude Code, Cursor, and any Agent Skills-compatible AI coding assistant.

Install
npx -y skills add krzysztofsurdy/code-virtuoso --skill git-workflow

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 20 stars20 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Git workflow patterns and version control best practices for teams of any size. Use when the user asks to choose a branching strategy (trunk-based, GitHub Flow, Git Flow, GitLab Flow), define commit conventions, set up PR workflows, plan release management, structure a monorepo, or establish team git standards. Covers branch naming, merge vs rebase, conventional commits, semantic versioning, changelog generation, and protected branch policies.

SKILL.md

9.6 KB, as published. Nobody here has run it

Git Workflow

Effective version control is not just about tracking changes - it is about enabling teams to collaborate predictably, release confidently, and maintain a history that tells a coherent story. The right workflow depends on team size, release cadence, and how much process the project can absorb without slowing down.

Choosing a Branching Strategy

No single branching model fits every team. The right choice depends on how often you release, how large your team is, and how much ceremony you can tolerate.

Strategy Comparison

StrategyRelease CadenceTeam SizeComplexityBest For
Trunk-BasedContinuous (multiple per day)Any (works best with strong CI)LowSaaS, cloud-native, teams with mature CI/CD
GitHub FlowOn-demand (per merged PR)Small to mediumLowWeb apps, startups, teams wanting simplicity
Git FlowScheduled / versioned releasesMedium to largeHighPackaged software, mobile apps, multiple supported versions
GitLab FlowEnvironment-promotedMedium to largeMediumTeams needing environment-specific branches (staging, production)

Decision Guide

  1. Do you deploy continuously? - Use trunk-based development. Short-lived branches (hours, not days), feature flags for incomplete work, and strong CI are prerequisites.
  2. Do you deploy on merge but want review gates? - Use GitHub Flow. One long-lived branch (main), feature branches, pull requests as the merge gate.
  3. Do you ship versioned releases on a schedule? - Use Git Flow. Separate develop and main branches, release branches for stabilization, hotfix branches for emergency patches.
  4. Do you promote through environments? - Use GitLab Flow. Environment branches (staging, production) sit downstream of main, and merges flow in one direction.

See Branching Strategies Reference for detailed mechanics, feature flag integration, and migration paths between strategies.


Commit Message Conventions

Good commit messages serve three audiences: reviewers reading the PR, developers reading git log next month, and automation tools generating changelogs and version bumps.

The Conventional Commits Format

<type>(<scope>): <description>

[optional body]

[optional footer(s)]

Common Commit Types

TypePurposeVersion Impact
featNew feature visible to usersMinor bump
fixBug fixPatch bump
refactorCode restructuring with no behavior changeNone
perfPerformance improvementPatch bump
testAdding or updating testsNone
docsDocumentation onlyNone
choreTooling, dependencies, build configNone
ciCI/CD pipeline changesNone
buildBuild system or dependency changesNone

Breaking Changes

Append ! after the type or add a BREAKING CHANGE: footer to signal incompatible changes. Either notation triggers a major version bump when used with automated release tooling.

feat(api)!: remove deprecated /v1/users endpoint

BREAKING CHANGE: The /v1/users endpoint has been removed. Use /v2/users instead.

Semantic Versioning Alignment

Commit ContainsVersion BumpExample
fix:Patch (1.0.0 -> 1.0.1)Bug corrections
feat:Minor (1.0.0 -> 1.1.0)New capabilities
BREAKING CHANGE or !Major (1.0.0 -> 2.0.0)Incompatible changes

See Commit Conventions Reference for scope naming patterns, multi-line body guidelines, changelog automation setup, and git hook validation.


Pull Request Workflow

Pull requests are the primary collaboration point in most git workflows. Their quality directly affects review speed, defect discovery, and team velocity.

PR Size Guidelines

PR Size (lines changed)Review QualityRecommended
< 50Excellent - reviewer catches most issuesIdeal for stacked PRs
50-200Good - manageable cognitive loadSweet spot for most changes
200-400Acceptable - requires focused review timeUpper bound for single reviews
400+Poor - reviewer fatigue, defects slip throughSplit into smaller PRs

Core PR Practices

  • One concern per PR - A PR should do one thing: add a feature, fix a bug, refactor a module. Mixing concerns makes review harder and reverts riskier.
  • Write a clear description - State what changed, why it changed, and how to verify it. Link to the relevant ticket or issue.
  • Keep the diff reviewable - Move large mechanical changes (renames, formatting) into separate PRs from logic changes.
  • Respond to feedback promptly - Stale PRs accumulate merge conflicts and block dependent work.

Merge Strategies

StrategyHistory ShapeBest For
Merge commitPreserves branch topology, creates merge nodeOpen-source projects, audit trails
Squash and mergeCollapses branch into single commit on mainFeature branches with messy intermediate commits
Rebase and mergeLinear history, no merge commitsTeams wanting clean, linear logs

See PR Patterns Reference for description templates, CODEOWNERS configuration, branch protection rules, stacked PR workflows, and review assignment strategies.


Release Management

Release management bridges development and deployment. The approach depends on whether releases are continuous, scheduled, or versioned.

Release Models

ModelHow It WorksWhen to Use
Continuous releaseEvery merged PR deploys automaticallySaaS with strong CI/CD and monitoring
Scheduled releaseChanges accumulate, release on a cadence (weekly, biweekly)Teams needing coordination windows
Versioned releaseExplicit version tags, release branches for stabilizationLibraries, APIs, packaged software

Git Tags for Releases

Tags mark specific commits as release points. Use annotated tags for releases because they store author, date, and message metadata.

# Create an annotated release tag
git tag -a v1.2.0 -m "Release 1.2.0: Add user dashboard and fix auth timeout"

# Push tags to remote
git push origin v1.2.0

# List existing tags matching a pattern
git tag -l "v1.*"

Automated Release Pipeline

When conventional commits are combined with release automation tooling, the pipeline can:

  1. Analyze commits since the last tag to determine the next version
  2. Generate or update the changelog from commit messages
  3. Create the git tag
  4. Build and publish artifacts
  5. Create a release entry on the hosting platform (GitHub/GitLab)

This eliminates manual version decisions and ensures the changelog stays synchronized with actual changes.

Hotfix Workflow

When a critical bug is found in production:

  1. Branch from the release tag (not from the development branch)
  2. Apply the minimal fix
  3. Tag the new patch release
  4. Merge the fix forward into the main development line to prevent regression
# Branch from the release tag
git checkout -b hotfix/fix-auth-crash v1.2.0

# After fixing and committing
git tag -a v1.2.1 -m "Hotfix: prevent auth crash on expired tokens"
git push origin v1.2.1

# Merge fix back to main
git checkout main
git merge hotfix/fix-auth-crash

Quick Reference: Common Workflow Problems

ProblemLikely CauseResolution
Frequent merge conflictsLong-lived branches, infrequent integrationMerge main into feature branches daily, or switch to trunk-based
Broken main branchNo CI on PRs, insufficient test coverageRequire passing CI before merge, add branch protection
Unclear release contentsNo commit conventions, manual changelogsAdopt conventional commits, automate changelog generation
Slow PR reviewsPRs too large, no clear ownershipSet size guidelines, configure CODEOWNERS, use stacked PRs
Accidental commits to mainNo branch protectionEnable branch protection rules, require PR reviews

Reference Files

ReferenceContents
Branching StrategiesTrunk-based, GitHub Flow, Git Flow, GitLab Flow - mechanics, feature flags, comparison matrix
Commit ConventionsConventional commits format, scope patterns, semantic versioning, changelog automation, git hooks
PR PatternsSize guidelines, description templates, CODEOWNERS, merge strategies, branch protection, stacked PRs

Integration with Other Skills

SituationRecommended Skill
Setting up CI/CD pipelines for branch protectionInstall knowledge-virtuoso from krzysztofsurdy/code-virtuoso for testing strategies
API versioning aligned with git release tagsInstall knowledge-virtuoso from krzysztofsurdy/code-virtuoso for API design principles
Coordinating releases across microservicesInstall knowledge-virtuoso from krzysztofsurdy/code-virtuoso for microservices patterns
Sprint-aligned release planningInstall knowledge-virtuoso from krzysztofsurdy/code-virtuoso for scrum workflows

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.