All of lore.kernel.org
 help / color / mirror / Atom feed
* "git checkout" obliterates not-yet-ignored files
@ 2018-11-04 19:29 Matthias Urlichs
  0 siblings, 0 replies; only message in thread
From: Matthias Urlichs @ 2018-11-04 19:29 UTC (permalink / raw)
  To: git


[-- Attachment #1.1: Type: text/plain, Size: 606 bytes --]

Hi,

the problem: suppose I decide that a local file should no longer be
controlled by git. Thus I add it to .gitignore and then "git rm
--cached" it. So far so good.

However, if I subsequently modify that file and then go back to a commit
that still contains it, my local changes will be obliterated.

IMHO that's a bug – .gitignore should only be used for (not) adding
non-version-controlled files. It does not tell git to ignore changes (in
files that *are* under version control), and thus it should not allow
any git command to simply overwrite a file.

-- 
-- Matthias Urlichs



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-11-04 19:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-04 19:29 "git checkout" obliterates not-yet-ignored files Matthias Urlichs

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.