I have only the untracked files in git repo code example Example 1: how to remove untracked files in git git clean -f Example 2: how to remove untracked files in git git clean -n