Skip to content

Git clean for removing untracked files

Git clean is a command used to remove untracked files from the working directory. This is useful for clearing a workspace of temporary build artifacts or files that have not been added to version control.

Removing files and directories

To remove untracked files, the -f (force) flag is required. To recursively remove untracked directories, the -d flag is used.^[600-developer__tools__git__git-command.md]

[Git clean](<./git-clean.md>) -f -d

Sources

^[600-developer__tools__git__git-command.md]