git clean - removed untracked files

Git clean

We can use the git clean command to remove untracked files in one go.

Dry Run With Git Clean

We can use the -n flag to show the list of files that would be removed with git clean
git clean -n

Remove Untracked File

This command will actually remove the untracked files.
#remove only untracked files
git clean -f
#remove untracked files and folder
git clean -fd





Cookbook Category: 
Git

Add new comment