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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
git checkout -- foo.txtgit 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).