git-governance

Resolve Git shared-branch synchronization failures with rescue branches and work logs.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/AoManoh/project_templates --skill git-governance-aomanoh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-governance
Source: https://github.com/AoManoh/project_templates/tree/main/skills/git-governance
Command: npx skills add https://github.com/AoManoh/project_templates --skill git-governance-aomanoh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents risky shared-branch Git actions (like unsafe pulls, rebases, and forced pushes) from corrupting history, causing long-lived forks, or losing recovery options by enforcing a strict evidence-first workflow and standardized handling for common failure scenarios.

Core Features & Use Cases

  • Safe branch-state inspection: Collects objective baseline data and determines whether the repository is in a safe, explicable state to continue.
  • Non-fast-forward recovery: Handles push rejections using rescue branches and merge-based integration (no default force push, no default shared-history rebase).
  • Dual-environment synchronization (WSL + Remote SSH): Enforces single-writer behavior and serial sync to avoid cross-environment divergence.
  • Audit trail in work logs: Records trigger,现场状态, actions, decision rationale, and results into docs/work-logs for later review and recovery.

Quick Start

Ask the AI to run the git-governance workflow to resolve a push rejection by safely syncing with the remote, merging using a rescue branch, and writing the decision log to docs/work-logs.

Frequently Asked Questions about git-governance

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

FAQPage Schema
How do I safely resolve a non-fast-forward push rejection on a shared Git branch?

To resolve a non-fast-forward push rejection, use a rescue branch and merge-based integration instead of force pushing. This prevents history corruption and ensures all actions are logged in work logs for auditability.

How do I fix Git branch divergence during WSL and Remote SSH dual-environment collaboration?

Fix Git branch divergence in WSL and Remote SSH environments by enforcing single-writer behavior and executing serial synchronization to prevent cross-environment conflicts and maintain a consistent repository state.

What is the best way to handle a rebase interruption without losing recovery options?

Handle a rebase interruption by collecting objective baseline data first, avoiding unapproved shared-history rebases, and using rescue branches to maintain maximum recoverability and history integrity.

How do I keep shared-branch Git operations auditable for team collaboration?

Keep shared-branch Git operations auditable by enforcing an evidence-first workflow that records the trigger, state, actions, decision rationale, and results into docs/work-logs for later review.

Can I use ff-only default pulls to prevent unsafe Git history changes?

Yes, use ff-only default pulls to prevent unsafe Git history changes. This strict approach avoids unintended merge commits and minimizes history pollution on shared branches.