git clean -xdf is a great "sh*t hit the fan" command. It erases each and every file in your git directory which is NOT part of your repository. All additional files, such as the ones listed in your .gitignore, will be removed. It's a useful one when you need a fresh start, usually used in conjunction with git reset --hard. Be careful when you use it in projects where external dependencies are downloaded into your projects folder (looking at you, node_modules!) because you'll have to re-download everything again.
git clean -xdf
is a great "sh*t hit the fan" command. It erases each and every file in your git directory which is NOT part of your repository. All additional files, such as the ones listed in your.gitignore
, will be removed. It's a useful one when you need a fresh start, usually used in conjunction withgit reset --hard
. Be careful when you use it in projects where external dependencies are downloaded into your projects folder (looking at you,node_modules
!) because you'll have to re-download everything again.I guess
git clean -xdf
is something in the line of "with great power...".😅Thanks for sharing.