backport-commit

Manually apply a Git commit diff to the current branch.

58.3k|3.9k|Updated Dec 29, 2015
One-click install
npx skills add https://github.com/penpot/penpot --skill backport-commit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backport-commit
Source: https://github.com/penpot/penpot/tree/main/.opencode/skills/backport-commit
Command: npx skills add https://github.com/penpot/penpot --skill backport-commit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Backport changes from a specific Git commit to the current branch by manually applying the diff, avoiding git cherry-pick when it would introduce complex conflicts.

Core Features & Use Cases

  • Identify the target commit and capture the full diff to understand all touched modules and files.
  • Determine affected modules and read their AGENTS.md to understand module-specific constraints before editing.
  • Apply changes manually to each affected file, preserving intent and resolving conflicts with careful patching.

Quick Start

Identify the target commit and begin the manual backport workflow to apply changes to the current branch.

Frequently Asked Questions about backport-commit

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

FAQPage Schema
How do I backport a git commit without using cherry-pick?

To backport a commit without cherry-pick, manually apply the diff to your current branch. This approach inspects the target commit's diff, identifies affected modules, and patches files hunk-by-hunk to avoid complex merge conflicts.

Why does git cherry-pick introduce merge conflicts across multiple modules?

Git cherry-pick introduces merge conflicts when a commit touches multiple modules with diverging histories. Manual diff application resolves this by patching changes hunk-by-hunk and reviewing module-specific constraints before editing.

What's the best way to apply a patch from one branch to another?

The best way to apply a patch safely is to manually apply the diff hunk-by-hunk to the current branch. This module-aware method ensures you preserve intent and validate the result with project checks before committing.

How do I resolve conflicts when backporting changes to affected modules?

To resolve conflicts when backporting changes, manually apply the diff to each affected file. You inspect module-specific constraints and carefully patch the changes hunk-by-hunk instead of relying on automated cherry-pick.

When should I avoid git cherry-pick for patching commits?

You should avoid git cherry-pick when a commit touches multiple modules or introduces complex conflicts. In these scenarios, manually applying the diff provides careful patching and module-aware review to safely backport changes.