$ git status
# On branch test
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       .python-version
nothing added to commit but untracked files present (use "git add" to track)

$ git clean -f -d
Removing .python-version

$ git status
# On branch test
nothing to commit (working directory clean)

相关文章: