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

Re: git overwriting local ignored files?

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 24, 2018, 04:22 UTC
Message-ID
<xmqqftvr2jfo.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<a852c0e9-f278-8e2a-406c-bb6099b2440c@mandelberg.org>
David Mandelberg <david@mandelberg.org> writes:
Show 6 quoted lines
> It seems that git is overwriting my local files on merge if they're in
> .gitignore. See command transcript below. I searched `git help config`
> and Google, but I couldn't find any way to prevent it. Am I missing
> something? (The reason I care about ignored files is that I'm using
> git with a working directory of $HOME to manage my dotfiles, and most
> files in my $HOME are not tracked by git but are still important.)

The .gitignore file is to list "ignored and expendable" class of files; there is no "ignored but precious class" in Git.

Previous: David MandelbergNext: David Mandelberg
Message 2 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.