git中Untracked files如何清除

$ 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)
原文地址:https://www.cnblogs.com/ZhangRuoXu/p/6706514.html