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