sync-stale-branches

Syncs diverged Git branches to develop and rescues unique work automatically.

2.3k|769|Updated Jan 14, 2016
One-click install
npx skills add https://github.com/Bottelet/DaybydayCRM --skill sync-stale-branches
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sync-stale-branches
Source: https://github.com/Bottelet/DaybydayCRM/tree/main/.claude/skills/sync-stale-branches
Command: npx skills add https://github.com/Bottelet/DaybydayCRM --skill sync-stale-branches

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps maintain a clean repository by identifying and updating stale remote branches, making the branch list clean and PR-able.

Core Features & Use Cases

  • Identifies and updates stale branches: Finds branches that have diverged and are no longer necessary, then updates them or deletes them based on their unique work.
  • Classifies branches: Determines whether branches are EMPTY, COVERED, or have UNIQUE work.
  • Rescues unique work: For branches with UNIQUE work, this Skill extracts the work and saves it to the correct feature branch before resetting the stale branch.
  • Verifies the outcome: After cleaning the branches, it verifies that all branches are in sync with the 'develop' branch.

Quick Start

Use the sync-stale-branches skill to clean up your stale branches. To execute, type 'sync-stale-branches'.

Frequently Asked Questions about sync-stale-branches

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

FAQPage Schema
How do I clean up stale remote branches in Git?

Stale branch cleanup involves identifying diverged remote branches, classifying them as EMPTY, COVERED, or having UNIQUE work, and automatically rescuing unique commits before resetting the branches to the develop branch.

What is the best way to rescue unique work from diverged Git branches?

The best way to rescue unique work from diverged Git branches is to extract the unique commits and save them to the correct feature branch before resetting the stale branch back to the develop branch.

How does automated branch maintenance classify stale Git branches?

Automated branch maintenance classifies stale Git branches by analyzing their divergence from the develop branch to determine if they are EMPTY, COVERED by existing work, or contain UNIQUE commits that need to be rescued.

Do I need to manually configure Git features for stale branch cleanup?

No manual configuration is required for stale branch cleanup. The process operates with no user intervention, assuming only that Git and the necessary Git features for branch pruning and resetting are present in the repository.

Can I synchronize diverged branches to the develop branch automatically?

Yes, you can synchronize diverged branches to the develop branch automatically by running a script that rescues unique work, resets stale branches, and verifies that all branches are back in sync with the develop branch.

When should I avoid automated stale branch cleanup in my repository?

You should avoid automated stale branch cleanup if your repository lacks the necessary Git features for pruning and resetting, or if your workflow does not rely on a central develop branch for synchronization.