[英]How to untrack all deleted files in Git
What's the command to untrack all deleted files in Git? 在Git中删除所有已删除文件的命令是什么?
I know there's a command to untrack a file by name ( git rm myfile
) 我知道有一个命令要按名称解压缩文件(
git rm myfile
)
But I'd like to untrack all the deleted files, without caring about how they're named. 但是我想要删除所有已删除的文件,而不关心它们的命名方式。
在较新版本的git中,这些文件会使用git add --update
自动取消跟踪。
你检查过git clean
命令了吗?
$ git diff-files --diff-filter=D --name-only -z | xargs -0 git rm
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.