Ben Woosley's blog



Ben WoosleyBen Woosley
The Multitalented 'git add' - rm-ing files and selectively staging changes
edit Posted by Ben Woosley on Friday February 13, 2009 at 03:01PM

A problem I had as a git newbie, and one I've seen others struggle with, is the problem of how to conveniently stage the deletion of files which are already deleted from disk, but aren't yet reflected in the index? That is, without 'git rm'ing them one at a time or using some other hack (e.g. 'git ls-files --deleted') to do so.

The answer is 'git add'