Git Hygiene Loop
This loop helps maintain a clean Git repository by identifying and removing stale or outdated branches that are no longer needed. It ensures your branch list…
This loop is republished with attribution. Full credit and the original content belong to the source linked above.
AI Skill Market Insights
Real data. Real impact.
Emerging
Developers
Kickoff Prompt
Copy this prompt and run it with your agent to start the loop.
Start the "Git Hygiene Loop" loop.
Goal: Remove stale branches
Max iterations: 10
Between iterations run: branch audit
Exit when: Cleanup complete
Please start the Git Hygiene Loop. Audit all local and remote branches, identify stale ones that have been merged and are older than 30 days, and remove them following the guardrails. Repeat this process up to 10 times or until no more stale branches are found.
Self-pace this loop. After each iteration, run `branch audit` and evaluate the output, and only continue if the exit condition is not met (Cleanup complete). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.