git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git overwriting local ignored files?

From
David Mandelberg <david@mandelberg.org>
Date
Nov 25, 2018, 02:06 UTC
Message-ID
<89204364-f624-62ec-fbaa-84b5b7ae4099@mandelberg.org>
In-Reply-To
<20181124154132.co3lo27wy25i4v47@tigra>
On 11/24/18 10:41 AM, Konstantin Khomoutov wrote:
Show 21 quoted lines
> On Sat, Nov 24, 2018 at 05:57:24PM +0300, Konstantin Khomoutov wrote:
>> On Sat, Nov 24, 2018 at 09:37:06AM -0500, David Mandelberg wrote:
>>
>>>>> It seems that git is overwriting my local files on merge if they're in
>>>>> .gitignore.
>> [...]
>>>> The .gitignore file is to list "ignored and expendable" class of
>>>> files; there is no "ignored but precious class" in Git.
>>> Ok. Would a patch be welcome? I have three ideas for how to implement it,
>>> and I'm not sure which is better.
>> [...]
>>
>> You might want to first investigate this recent thread [1] which AFAIK
>> was dedicated to exactly this problem.
> 
> Well, actually the thread is old, but its continuation [2] is recent.
> The crux is that it discusses certain approaches to solve the apparent
> problem and patches to do that.
> 
> 1. https://public-inbox.org/git/4C6A1C5B.4030304@workspacewhiz.com/
> 2. https://public-inbox.org/git/871s8qdzph.fsf@evledraar.gmail.com/

Thanks for the pointers, and sorry to start a new thread. It looks like most of the work to do is in finding consensus on the right way forward, rather than in writing a patch. While I really would like there be a way to prevent git from overwriting ignored files, I don't have any strong opinions on what that way should look like. So I think I'll just wait and hope somebody else does the work.

-- 
https://david.mandelberg.org/
Previous: Konstantin Khomoutov
Message 6 of 6 in “git overwriting local ignored files?”
  1. David MandelbergNov 24, 2018
  2. Junio C HamanoNov 24, 2018
  3. David MandelbergNov 24, 2018
  4. Konstantin KhomoutovNov 24, 2018
  5. Konstantin KhomoutovNov 24, 2018
  6. David MandelbergNov 25, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.