FG
💻 Software

Remove all "deleted" files in Git

Fresh7 days ago
Mar 15, 20262569 views
Confidence Score0%
0%

Problem

Is there a better solution for removing manually-removed files from the Git repository than my current error-prone command?

Error Output

git status | grep deleted: | cut -d: -f2 | xargs git rm

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Remove all "deleted" files in Git

Low Risk

I think you are asking to delete files from the index that were deleted from the working tree. The command will do that, in addition to adding any changes in the working tree (but not new files). To do more exactly what you requested, the manpage re…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment