← Back to Skills
๐Ÿงน

Git Branch Cleanup

List stale branches, check if they are merged, and suggest cleanup actions

Developer 4 steps 4 tools 3 servers

Example Prompt

Find all stale branches in our main repo that are older than 30 days and suggest which ones to delete

About

Helps maintain repository hygiene by scanning for branches that have gone stale. Checks each branch against the main branch to determine if it has been fully merged and is safe to delete. Generates a cleanup report listing branches recommended for deletion and posts it for team review.

Workflow Steps

1

Search the repository for all existing branches and their last commit dates

๐Ÿ” Search Repositories
2

Check associated pull requests to determine merge status of each branch

๐Ÿ“‹ List Issues
3

Analyze branch staleness and merge status to classify cleanup recommendations

๐Ÿง  Structured Reasoning
4

Post the branch cleanup report with recommended actions to Slack

๐Ÿ“จ Send Message

Tags

gitbranchescleanuprepository