GIT-CLEAR-SOFT(1)

πŸ’– git-clear-soft β€” bestie's guide to the soft reset πŸ’–

okay so picture this: you're in the git-extras manual, section GIT-CLEAR-SOFT(1), and this lil command is about to give your repo a glow-up without nuking the stuff you actually care about. let's get into it 🫢


✨ NAME ✨

git-clear-soft β€” soft clean up a repository πŸ§ΉπŸ’…


🌸 SYNOPSIS 🌸

git-clear-soft

that's it. no flags, no arguments, no drama. she's low maintenance fr fr ✨


πŸ’œ DESCRIPTION πŸ’œ

okay so here's the vibe: git-clear-soft clears your repository into a state that looks like it was freshly cloned with the current HEAD. brand new. iconic. main character energy. πŸ’«

BUT β€” and this is the important part bestie β€” it preserves all changes that are located in files and directories listed in .gitignore. so everything you ghosted via .gitignore? still there. still thriving. untouched. 🌈

mechanically, it's a git-reset --hard together with deletion of all untracked files that reside inside the working directory β€” excluding those in .gitignore. πŸŽ€

so like:

  • <rainbow>git-reset --hard</rainbow> β€” yes, she goes hard πŸ’€
  • delete all the untracked files chillin in your working directory πŸ—‘οΈ
  • BUT skip anything in .gitignore β€” those are protected, no cap πŸ›‘οΈβœ¨

it's giving "spring cleaning but I'm keeping my emotional support .env file" πŸ˜­πŸ’–


πŸ’… EXAMPLES πŸ’…

clears the repo. that's the whole thing. go off πŸ‘‘

$ git clear-soft
⚠️ real talk bestie: this deletes untracked files in your working directory. not a drill. the .gitignore ones are safe, everything else is on its own. vibe check your repo before you hit enter fr fr 😭

πŸ‘‘ AUTHOR πŸ‘‘

this lil script was written by Daniel 'grindhold' Brendle <grindhold@gmx.net>, and it's a modified version of that script, modified by Matiss Treinis <mrtreinis@gmail.com>. legends only 🫢✨


πŸ› REPORTING BUGS πŸ›

found a bug? not the vibe. tell the people here:

<https://github.com/tj/git-extras/issues>

they will handle it. slay. πŸ’–


πŸ¦‹ SEE ALSO πŸ¦‹

<https://github.com/tj/git-extras>


that's the whole page bestie, you ate this one πŸŽ€πŸ’«

Git Extras Β· May 2026 Β· GIT-CLEAR-SOFT(1) β€” ok bye love u, go clean that repo responsibly πŸ’œπŸŒΈπŸ¦‹

πŸ“¦ where this page comes from