Git - Clean

Management

Simulation

What will be deleted by using the -n option:

git clean -n

Force

Clean Step - beware: this will delete files:

git clean -f

Remove

ignored directories

git clean -f -d 
#or 
git clean -fd

ignored files

git clean -f -X 
#or 
git clean -fX

ignored and non-ignored files

git clean -f -x 
#or git clean -fx





Discover More
Git File Lifecycle
What is the Git File Status?

The status of a file in a working directory is one of: where: State Tracked Description untracked New file unmodified Tracked File is the same as in the last commit modified Tracked File...



Share this page:
Follow us:
Task Runner