git deleted files cannot be staged

Posted: September 30, 2014 in web

For Git 1.x

$ git add -u
This tells git to automatically stage tracked files — including deleting the previously tracked files.

For Git 2.0

To stage your whole working tree:

$ git add -u :/
To stage just the current path:

$ git add -u .

Source:
http://stackoverflow.com/questions/492558/removing-multiple-files-from-a-git-repo-that-have-already-been-deleted-from-disk

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s