Git Command Clean

Clean lets us if we have untracked files & we don't care about them & want to get back to regular version we can git clean -f to stop the untracked files.


Terminal example:

Terminal
>
git clean -f
> Output:

remove unwanted files from your working directory

If there are directories that are untracked & we want to remove untracked files which are actually directories/folders we can run

Terminal
>
git clean -fd
> Output:

Removing directoryName/