Agent Skillscbrock84/headcount › branch-and-worktree-workflow

branch-and-worktree-workflow

GitHub

规范 Git 分支与工作树流程,指导隔离开发、并行处理及合并策略。涵盖创建、维护、完成阶段的最佳实践与禁忌,确保代码整洁和协作顺畅。

plugins/technology/skills/branch-and-worktree-workflow/SKILL.md cbrock84/headcount

Trigger Scenarios

需要隔离功能开发时 多个任务并行处理同一仓库时 准备合并或拆分代码进行审查时

Install

npx skills add cbrock84/headcount --skill branch-and-worktree-workflow -g -y
More Options

Non-standard path

npx skills add https://github.com/cbrock84/headcount/tree/main/plugins/technology/skills/branch-and-worktree-workflow -g -y

Use without installing

npx skills use cbrock84/headcount@branch-and-worktree-workflow

指定 Agent (Claude Code)

npx skills add cbrock84/headcount --skill branch-and-worktree-workflow -a claude-code -g -y

安装 repo 全部 skill

npx skills add cbrock84/headcount --all -g -y

预览 repo 内 skill

npx skills add cbrock84/headcount --list

SKILL.md

Frontmatter
{
    "name": "branch-and-worktree-workflow",
    "description": "Isolates feature work in its own branch or worktree and integrates it cleanly when done. Use this when starting work that should not disturb the current workspace, when several efforts must proceed in parallel on one repository, or when implementation is finished and the change needs merging, rebasing, or splitting for review."
}

Branch and worktree workflow

Starting

Work that will take more than one sitting, or that runs alongside other work, gets its own isolated workspace. A worktree gives you a second checkout of the same repository on a different branch — two efforts, two directories, one object store, no stashing.

Branch from the current upstream default, not from whatever is checked out. Branching off a stale local branch is how unrelated commits end up in a review.

While working

  • Commit at points where the tree is coherent, not at the end of the day.
  • Keep the branch current with its base often. A merge conflict found on day one is a five-minute fix; the same conflict found on day ten is an afternoon.
  • One concern per branch. If you find an unrelated bug, note it and leave it.

Finishing

Before proposing the work:

  1. Rerun the full check the project actually gates on, not the subset you have been running.
  2. Read your own diff top to bottom. Remove debug output, stray files, and commented-out code.
  3. Confirm the branch merges cleanly into its base.

Then decide how it integrates:

  • Small and coherent — merge as is.
  • Several separable concerns — split into stacked branches so each can be reviewed on its merits. A reviewer given three concerns in one diff reviews none of them well.
  • Exploratory — keep the useful commits, drop the rest.

Never

  • Rewrite history on a branch someone else has checked out. Merge instead; a force-push breaks their working copy.
  • Leave a worktree behind after merging — stale worktrees hold references and confuse later work.
  • Merge your own change without the checks green on the final commit, not an earlier one.

Version History

  • d58a7ee Current 2026-09-02 21:11

Same Skill Collection

plugins/corporate-strategy/skills/chief-strategy-officer/SKILL.md
plugins/corporate-strategy/skills/market-entry/SKILL.md
plugins/corporate-strategy/skills/mergers-and-acquisitions/SKILL.md
plugins/corporate-strategy/skills/portfolio-strategy/SKILL.md
plugins/corporate-strategy/skills/scenario-planning/SKILL.md
plugins/corporate-strategy/skills/strategic-alliances/SKILL.md
plugins/customer-experience/skills/chief-customer-officer/SKILL.md
plugins/customer-experience/skills/customer-onboarding-and-implementation/SKILL.md
plugins/customer-experience/skills/customer-success-management/SKILL.md
plugins/customer-experience/skills/escalation-management/SKILL.md
plugins/customer-experience/skills/self-service-and-knowledge/SKILL.md
plugins/customer-experience/skills/support-operations/SKILL.md
plugins/customer-experience/skills/voice-of-customer/SKILL.md
plugins/data-analytics/skills/ai-ml-governance/SKILL.md
plugins/data-analytics/skills/business-intelligence/SKILL.md
plugins/data-analytics/skills/chief-data-officer/SKILL.md
plugins/data-analytics/skills/data-engineering/SKILL.md
plugins/data-analytics/skills/data-governance/SKILL.md
plugins/data-analytics/skills/data-modeling/SKILL.md
plugins/demand-generation/skills/ai-search-optimization/SKILL.md
plugins/demand-generation/skills/app-store-optimization/SKILL.md
plugins/demand-generation/skills/experimentation/SKILL.md
plugins/demand-generation/skills/landing-page-cro-expert/SKILL.md
plugins/demand-generation/skills/lead-capture/SKILL.md
plugins/demand-generation/skills/lifecycle-messaging/SKILL.md
plugins/demand-generation/skills/listing-distribution/SKILL.md
plugins/demand-generation/skills/marketing-analytics/SKILL.md
plugins/demand-generation/skills/paid-advertising/SKILL.md
plugins/demand-generation/skills/programmatic-seo/SKILL.md
plugins/demand-generation/skills/seo-strategy/SKILL.md
plugins/executive/skills/ai-research-analyst/SKILL.md
plugins/executive/skills/business-growth-consultant/SKILL.md
plugins/executive/skills/chief-executive/SKILL.md
plugins/executive/skills/fundraising-and-investor-relations/SKILL.md
plugins/executive/skills/saas-idea-validator/SKILL.md
plugins/finance/skills/budgeting-and-forecasting/SKILL.md
plugins/finance/skills/capital-allocation/SKILL.md
plugins/finance/skills/capital-structure-and-covenants/SKILL.md
plugins/finance/skills/cost-accounting/SKILL.md
plugins/finance/skills/financial-modeling/SKILL.md
plugins/finance/skills/financial-reporting-and-close/SKILL.md
plugins/finance/skills/financial-statement-analysis/SKILL.md
plugins/finance/skills/internal-controls-and-audit/SKILL.md
plugins/finance/skills/revenue-recognition/SKILL.md
plugins/finance/skills/tax/SKILL.md
plugins/finance/skills/treasury-and-liquidity/SKILL.md
plugins/finance/skills/unit-economics/SKILL.md
plugins/it-operations/skills/backup-and-recovery/SKILL.md
plugins/it-operations/skills/chief-information-officer/SKILL.md
plugins/it-operations/skills/cloud-administration/SKILL.md

Metadata

Files
0
Version
9cbf340
Hash
63cbf34b
Indexed
2026-09-02 21:11

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-15 16:42
浙ICP备14020137号-1 $bản đồ khách truy cập$