> On Wed, 15 Oct 2008, Andrew Morton wrote:
>
>> Date: Wed, 15 Oct 2008 11:56:54 -0700
>> From: Andrew Morton <akpm@linux-foundation.org>
>> To:
git@vger.kernel.org
>> 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.