Subject: Strange merge failure (would be overwritten by merge / cannot merge)

From: Christoph Haas <[email-masked]>
Date: Fri, 04 Sep 2009 22:28:36 +0200

Dear list,

I'm struggling with a pretty simple Git repository where I maintain one
of my Debian packages. It has two branches:

 - upstream (contains the unaltered original software unpacked from
   a .tar.gz)
 - master (derived from upstream plus Debian specific changes)

Now I imported a new upstream version into the upstream branch. And then
tried to merge the 'upstream' branch into the 'master' branch to work on
it. And suddenly I get this error:

   error: Entry 'cream-abbr-eng.vim' would be overwritten by merge.
   Cannot merge.

So it looks like the 'cream-abbr-eng.vim' file has been altered. And it
contains some non-ASCII characters (it's a VIM script file) so perhaps
automatic merging fails. But can't I just tell Git to screw my file in
the 'master' branch and just overwrite my file? No merge strategy helped
me accomplish that.

To reproduce my problem:

  $> git clone git://git.workaround.org/cream
  $> cd cream
  $> git merge origin/upstream
  error: Entry 'cream-abbr-eng.vim' would be overwritten by merge.
  Cannot merge.
  fatal: merging of trees 70008c82f82a7985531aa2d039c03fdf944ea267 and
  78d3a35e300434d6369424dd873bb587beacfaa4 failed

Help welcome. I'm no Git guru and totally at a loss here. As a last
resort I would start from scratch losing all of my Git history.

Kindly
 Christoph