Reputation: 24836
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.
Upvotes: 16
Views: 15143
Reputation: 618
In the newer versions of git, those files are automatically untracked with git add --update
.
Upvotes: 31
Reputation: 139451
$ git diff-files --diff-filter=D --name-only -z | xargs -0 git rm
Upvotes: 2