Re: Untracked working tree files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 15 Oct 2008 12:14:34 -0700 (PDT)
david@xxxxxxx wrote:

> On Wed, 15 Oct 2008, david@xxxxxxx wrote:
> 
> > On Wed, 15 Oct 2008, Andrew Morton wrote:
> >
> >> Date: Wed, 15 Oct 2008 11:56:54 -0700
> >> From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> >> To: git@xxxxxxxxxxxxxxx
> >> Subject: Untracked working tree files
> >> 
> >> I often get this (running git 1.5.6.rc0 presently):
> >> 
> >> y:/usr/src/git26> git-checkout linux-next
> >> error: Untracked working tree file 'arch/x86/kernel/apic.c' would be 
> >> overwritten by merge.
> >> 
> >> which screws things up.  I fix it by removing the offending file, which
> >> gets irritating because git bails out after the first such instance, so
> >> I need to rerun git-checkout once per file (there are sometimes tens of 
> >> them).
> >
> > what I do when I run into this is "git reset --hard HEAD" which makes all 
> > files in the working directory match HEAD, and then I can do the other 
> > checkout.

I was using this but it seems it wasn't in the right place in the script.


> I think you can also do git checkout -f head to force the checkout to 
> overwrite all files

OK, I'll try that.

> the fact that git will happily leave modified things in the working 
> directory appears to be very helpful for some developers, but it's also a 
> big land mine for others.

These files weren't modified.  By me, at least.  git might have
"modified" them, but it has all the info necessary to know that the
file has no uncommitted changes.

> is there a way to disable this?
> 
> David Lang
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux