Intermediate10 minutes

Git Cherry-Pick Mastery: Stripe's Deployment Strategy

Learn advanced Git cherry-pick techniques used by Stripe engineers for selective feature deployment and hotfix management across multiple environments.

Git Cherry-Pick: Stripe's Selective Deployment Mastery

Stripe processes billions in payments daily. Their engineers use Git cherry-pick strategically to deploy specific fixes and features across multiple environments without disrupting ongoing development.

Why Stripe Relies on Cherry-Pick

In financial technology, not every feature can be deployed simultaneously. Stripe engineers use cherry-pick to:

  • Deploy critical security fixes to production immediately
  • Selectively enable features for specific customer segments
  • Backport bug fixes to stable release branches
  • Test features in staging environments independently

Stripe's Cherry-Pick Workflow

1. Hotfix Deployment

When a critical bug affects payment processing, Stripe engineers:


# Create hotfix branch from production
git checkout -b hotfix/payment-gateway-fix production

# Cherry-pick the fix from development
git cherry-pick abc123def

# Deploy immediately to production
      

2. Feature Flagging Integration

Stripe combines cherry-pick with feature flags for granular control:


# Cherry-pick feature to release branch
git cherry-pick feature-commit-hash

# Feature remains disabled by default
# Enabled only for beta customers initially
      

Advanced Cherry-Pick Strategies

Range Cherry-Picking

For multi-commit features, Stripe engineers cherry-pick commit ranges:

git cherry-pick start-commit^..end-commit

Conflict Resolution During Cherry-Pick

When conflicts arise, Stripe's process is systematic:

  1. Analyze why the conflict occurred
  2. Determine if the change is still relevant
  3. Adapt the change to the target branch context
  4. Test thoroughly in the new environment

Cherry-Pick without Commit

Sometimes Stripe engineers need to modify the change:

git cherry-pick --no-commit abc123def

This allows modification before committing to the target branch.

Stripe's Cherry-Pick Best Practices

1. Atomic Commits

Each commit represents a single logical change, making cherry-picking safer and more predictable.

2. Comprehensive Testing

Every cherry-picked change goes through the full test suite in the target environment.

3. Documentation

Stripe engineers document why specific commits were cherry-picked and to which branches.

Common Cherry-Pick Challenges

Dependency Issues

When cherry-picking a commit that depends on other changes, Stripe engineers:

  • Identify all dependencies
  • Cherry-pick dependencies first
  • Verify the complete functionality

Merge vs Cherry-Pick Decision

Stripe uses this decision matrix:

  • Cherry-Pick: Selective changes, hotfixes, feature isolation
  • Merge: Complete feature integration, regular development flow

Practice Stripe-Level Cherry-Pick Scenarios

Master the same cherry-pick strategies that keep Stripe's payment infrastructure running smoothly. Practice with real-world scenarios.

Practice Scenarios

hotfix cherry pick

Interactive scenario based on real enterprise challenges

Start Scenario →

feature isolation

Interactive scenario based on real enterprise challenges

Start Scenario →

dependency cherry pick

Interactive scenario based on real enterprise challenges

Start Scenario →

Ready to Master Git Like the Pros?

Join thousands of developers who've advanced their careers with enterprise Git skills