GIT-XCLEANER(1)

πŸ“¦
version 3.1 Β· 2 versions
, in fedora 43

πŸ’– git-xcleaner(1) πŸ’–

okay bestie, so this is the manual page for git-xcleaner, living in the General Commands Manual section of your friendly neighbourhood man pages. pull up a chair, we're cleaning branches 🧹✨


✨ NAME ✨

git-xcleaner β€” interactive git branch removal πŸ¦‹

like, it deletes branches. but make it interactive. the drama, the power πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

git xcleaner

that's it. that's the whole invocation. so clean, so simple, so iconic πŸ‘‘


🌸 DESCRIPTION 🌸

bestie listen. this tool helps you delete unused topic branches using a TUI (that's a text user interface, for the uninitiated πŸ’–). it ALSO has mechanisms for pre-selecting branches that can be safely removed β€” so it's not just a deleter, it's a thoughtful deleter. main character energy fr fr ✨

⚠️ It is NOT recommended running garbage collection after cleanup β€” this can wipe mis-deleted branches 😭 if you wanna do it, do it prior to running cleaning, so you are still able to recover after a few weeks. order matters, bestie, don't come for me later πŸ’€

🚨 WARNING 🚨

this tool deletes git branches after confirmation. once git garbage is collected there is no way back πŸ”₯

double check what you are about to remove. like, actually double check. triple check. vibe check it. πŸ™ˆ


πŸ’… ACTIONS πŸ’…

here's the menu of ways it picks what to yeet πŸ—‘οΈ

Merged

it runs git branch --merged to find a list of branches that are marked for deletion. simple. elegant. slay 🌈

Messages

for each branch, the tip commit message is compared against the base history, and if it's found, the branch is marked for deletion πŸ’–

heads up though: the whole commit message is compared and it must fully match β€” no partial matches, no "close enough", it's giving strict 🎯

the user enters a base branch name, which defaults to "master" ✨

Remote

delete all remote branches in the remote repo which are not present locally. bye girlies, you're not here anyway πŸ‘‹

the user enters a remote name, which defaults to the current username 🫢

Upstream

all branches which no longer exist in origin or a specific remote repository are marked for deletion πŸ¦‹

the user enters a specific remote name, which defaults to the current username ✨

Manual

you, yes YOU, manually mark branches for deletion. you're the main character now πŸ‘‘


🌈 ACTIVE BRANCH 🌈

the active branch is never marked for deletion. periodt. the tool protects its own πŸ’œ


🧚 UNDELETING 🧚

so... you mis-deleted a branch and ignored all the warnings in the documentation AND on the screen? 😭 okay. it happens. check out the homepage for instructions on how to checkout your branch back πŸ’–


⭐ RETURN VALUES ⭐

  • Zero on success πŸŽ‰
  • One on errors when manipulating with git πŸ’€

πŸ’€ BUGS πŸ’€

file bugs at https://github.com/lzap/git-xcleaner/issues β€” they wanna hear from you 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Lukas Zapletal and contributors (see README.md) πŸ’œ


(c) 2014 Lukas Zapletal


πŸŽ€ SEE ALSO πŸŽ€


that's the whole thing bestie, go forth and prune responsibly πŸ¦‹βœ¨

July 2025 β€” this page comes straight outta the General Commands Manual, version-and-date-wise, and that's the sign-off, mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from