Subject: Re: No error when overwriting ignored files

From: Junio C Hamano <[email-masked]>
Date: Wed, 07 Apr 2021 13:47:27 -0700

Horst von Brand <[email-masked]> writes:

> When pulling from a repository that tracks a file listed in
> `.gitignore` that would overwrite a local file, this is not
> reported.

Git has the notion of "not to be tracked (i.e. added to the index or
committed) and expendable files", and they are called "ignored"
files.  And ".gitignore" and .git/info/exclude mechanism is used to
mark these paths.

There is no notion of "not to be tracked but precious files" or
mechanism to mark paths as such.  So the behaviour you observed is
fully expected and working as designed.

Thanks.