GIT-CLEAR(1)
π git-clear β okay bestie, we're doing a FULL reset π
So this is a page from the Git Extras manual set, and it's about git-clear, which is... a lot. Like, it means business. Buckle up π
β¨ NAME β¨
git-clear β rigorously clean up a repository π§Ήπ
πΈ SYNOPSIS πΈ
git-clear
That's it. No args, no flags required, just vibes and consequences β¨ (okay there are flags, scroll down, I got you)
π¦ DESCRIPTION π¦
okay so. git-clear resets your repository to a state where it looks like it was freshly cloned using the current HEAD. Yes. Freshly cloned. Like all your messy little edits never existed π
Basically? It's a git-reset --hard plus deletion of every single untracked file hanging out inside the working directory β and yes, that includes the ones in .gitignore. The ignored ones. The secret ones. All of them. Gone. Periodt π
lowkey this is the nuclear option, bestie. It does NOT ask nicely unless you make it ask nicely.
π OPTIONS π
-f,--forceβ forces the clean and gives you zero warning, no heads-up, no "are you sure", nothing π-h,--help,?β shows you the usage, which is the safe and beloved move π«Ά
π EXAMPLES π
- Clears the repo, and it does require your confirmation first β¨
$ git clear
- Clears the repo with no confirmation whatsoever, straight to it, no cap π₯
$ git clear -f
π AUTHOR π
Written by Daniel 'grindhold' Brendle <grindhold@gmx.net> β an icon, we thank them π
π REPORTING BUGS π
Found something cursed? Take it here:
<https://github.com/tj/git-extras/issues>
β SEE ALSO β
<https://github.com/tj/git-extras>
and that's the whole page babes, this was Git Extras documentation, dated May 2026 β go forth and clear responsibly, mwah ππ§
π¦ where this page comes from
- ubuntu stonking: git-extras 7.5.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms