ddeveloperr
4/4/2016 - 6:02 PM

Remove multiple deleted files in Git repo

Remove multiple deleted files in Git repo

Problem: Remove multiple deleted files in Git repo

Note that '~$' stands for root directory in your terminal

Solutions:

This command will ONLY remove the deleted files from the git:

~$ git rm $(git ls-files --deleted)

Update all your changes using(Read note above!)

~$ git add -u

changed in Git 2.0 and should not be used anymore!

Another hint for for adding ONLY modified files:

~$ git add $(git ls-files --modified)