{"thread":{"id":"49757","subject":"\"git checkout\" obliterates not-yet-ignored files","startedAt":"2018-11-04T19:30:15Z","lastAt":"2018-11-04T19:30:15Z","messageCount":1,"participants":["Matthias Urlichs"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"362412","messageId":"949b99d6-c681-49ed-4a4e-d33e0f6487d3@urlichs.de","threadId":"49757","inReplyTo":null,"subject":"\"git checkout\" obliterates not-yet-ignored files","fromName":"Matthias Urlichs","fromEmail":"matthias@urlichs.de","sentAt":"2018-11-04T19:29:35Z","receivedAt":"2018-11-04T19:30:15Z","isPatch":false,"sender":{"key":"matthias@urlichs.de","avatar":"https://gravatar.com/avatar/2708905af227313eba6f2b2ae0f7d0259b5ac5d71baef58fe5a13c699ce0bbf0?d=mp&s=160"},"body":"Hi,\n\nthe problem: suppose I decide that a local file should no longer be\ncontrolled by git. Thus I add it to .gitignore and then \"git rm\n--cached\" it. So far so good.\n\nHowever, if I subsequently modify that file and then go back to a commit\nthat still contains it, my local changes will be obliterated.\n\nIMHO that's a bug – .gitignore should only be used for (not) adding\nnon-version-controlled files. It does not tell git to ignore changes (in\nfiles that *are* under version control), and thus it should not allow\nany git command to simply overwrite a file.\n\n-- \n-- Matthias Urlichs\n\n\n"}]}