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

Re: Tracking the untracked

From
Jakub Narebski <jnareb@gmail.com>
Date
May 7, 2009, 08:22 UTC
Message-ID
<m33abhnx01.fsf@localhost.localdomain>
In-Reply-To
<93c3eada0905070058g7f619a56jfb9b49f02bb92f9b@mail.gmail.com>
Geoff Russell <geoffrey.russell@gmail.com> writes:
> On 5/6/09, Thomas Rast <trast@student.ethz.ch> wrote:
> > Geoff Russell wrote:
> > > Bug or feature? I don't know.
> >
> >
> > Feature.
[...]
Show 8 quoted lines
> Ok, its clearly a policy choice.  But suppose I have an untracked
> file and I do "git some-command" then I don't expect git to touch what
> it doesn't know about. I.e., "git add x" shouldn't delete the untracked
> file y. That seems sensible. But now "git checkout branch" behaves
> quite differently in just deleting stuff that it doesn't own (i.e., is
> untracked).
> 
> Anyway, I'll rethink.

First, did you consider just .gitignore'ing untracked files, and if they are compilation products use cc-cache instead?

Second, the way git treats untracked files is simple: do not lose information. If a file is tracked, or to be more exact specific contents of a file is in repository, then deleting it would not remove information.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Geoff RussellNext: Thomas Rast
Message 5 of 7 in “Tracking the untracked”
  1. Geoff RussellMay 6, 2009
  2. Johannes SchindelinMay 6, 2009
  3. Thomas RastMay 6, 2009
  4. Geoff RussellMay 7, 2009
  5. Jakub NarebskiMay 7, 2009
  6. Thomas RastMay 7, 2009
  7. Geoff RussellMay 7, 2009

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.