discard untracked files in git shell code example Example 1: clear untracked files git git clean -n Example 2: clear untracked files git git clean -f