如何清除git中Untracked files

git clean -f -d

Sample:

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

$ git clean -f -d
Removing .text

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


你可能感兴趣的:(Git)