Reputation: 126125
I ask only for my general Git education - I don't have any particular problem atm. I'm just curious. Say you do this:
vim foo.txt
...write some good doco...
git add foo.txt
rm foo.txt
Can it be retrieved? How?
Upvotes: 0
Views: 56
Reputation: 185671
git checkout -- foo.txt
git checkout
, when given a path, checks things out of the index (by default; it can be instructed to check things out from commits as well).
Upvotes: 2