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