如何清除git中Untracked files

如何清除git中Untracked files

git clean -f -d

Sample:

$ git status
# On branch test
# Untracked files:
#   (use "git add <file>..." 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)
posted @ 2020-12-25 19:10  SunKeep  阅读(517)  评论(0编辑  收藏  举报