小编zko*_*nik的帖子

告诉git可以删除未跟踪的文件

可能重复:
如何从git工作副本中删除未跟踪的文件?

是否有可能告诉git删除未跟踪文件?主要是类似于重置的东西?

例:

git checkout -- index.php <-- revert my file
git checkout -- master <-- this would revert the entire repo back to the last commit on master, removing (deleting) any and all untracked files as well as reverting committed ones.
Run Code Online (Sandbox Code Playgroud)

我知道这对shell来说是微不足道的,但我想知道这是否可以在Git中完成?

git version-control

59
推荐指数
2
解决办法
2万
查看次数

标签 统计

git ×1

version-control ×1