简体   繁体   中英

How to untrack all deleted files in Git

What's the command to untrack all deleted files in Git?

I know there's a command to untrack a file by name ( 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM