Sublime Forum

Would be nice to expose git clean -fdx

#1

Indeed “git clean -fd” is enough to clean non-ignored files, but from time to time I need to clean all untracked & ignored files, and then it’s very annoying to switch to command line for that.

0 Likes

#2

It’s possible to define your own commands that invoke git directly with the arguments that you provide, so this should be something that you could set up on your own. I’m on mobile at the moment but when I get back to a PC I can show an example if someone else doesn’t beat me to it.

0 Likes

#3

Oh right here https://www.sublimemerge.com/docs/command_palette#example
That feature was a bit hidden tbh :slight_smile: Thanks!

PS. If anyone needs:

[
    {
        "caption": "Force clean",
        "command": "git",
        "args": {"argv": ["clean", "-xdf"]}
    }
]
1 Like

#4

Moved here https://github.com/sublimehq/sublime_merge/issues/403

0 Likes