tags:

views:

89

answers:

2

If I manually go into windows explorer and delete a bunch of files, is there any way to bulk commit the change?

I believe even after doing a :

git add .

it still tells me I have to do a:

git rm /path/to/file

Which will be a bit annoying if I have tons of files to delete?

+8  A: 

git add -u will stage all changes to all tracked files, including deletes.

If you have changes that aren't deletes that you don't want to stage you have to do something like:

git diff --name-only --diff-filter=D -z | xargs -0 git rm --
Charles Bailey
+7  A: 

In addition to Charles Bailey answer about git add -u (or git add -A which combines git add . with git add -u) and automation using xargs, I'd like to point out that git commit -a would pick file deletions automatically.

Jakub Narębski