- Current branch: !`git branch --show-current`
Performs repository maintenance and cleanup tasks including branch pruning, stash cleanup, and garbage collection.
/plugin marketplace add laurigates/claude-plugins/plugin install git-plugin@lgates-claude-pluginsgit/git branch --show-currentgit status --shortgit branch -vvgit stash listdu -sh .gitParse these parameters from the command (all optional):
--prune: Remove unreachable objects and optimize repository--gc: Run git garbage collection (aggressive)--verify: Verify integrity of git objects--branches: Clean up merged branches only--stash: Clean up stashes only--all: Run all maintenance tasks (default if no flags specified)Perform repository maintenance and cleanup based on the flags provided.
.gitignore and removing with git rm --cachedgit branch -d# Prune unreachable objects
git prune
# Run garbage collection
git gc --aggressive
# Repack objects
git repack -ad
# Show size improvement
du -sh .git
git fsck --full --strict
Report any issues found.
These operations are safe and non-destructive:
git gc - Garbage collectiongit prune - Prune unreachable objectsgit fsck - Verify integrityThese require user confirmation:
git branch -d - Delete branchesgit stash drop - Drop stashes