Is it possible to do git clean -xdf with some additional filter? What I want to do is delete all untracked files but keep files with a certain file extension.
Use the -e
option to specify an exclude pattern.
Example: This deletes all untracked files except those with the .txt
extension:
git clean -xdfe *.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With