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

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

From
CHChristoph Haas <haas@debian.org>
Date
Sep 4, 2009, 20:28 UTC
Message-ID
<4AA17874.7090905@debian.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqheHQACgkQCV53xXnMZYZSaQCdF4JovwKUx1FIOq82+joGUIlq a7UAoIoC2mm2L6Pv7MvZGzOIRNgktb2B =pklM -----END PGP SIGNATURE-----

Next: David Aguilar
Message 1 of 16 in “Strange merge failure (would be overwritten by merge / cannot merge)”
  1. Christoph HaasSep 4, 2009
  2. David AguilarSep 4, 2009
  3. Christoph HaasSep 5, 2009
  4. Junio C HamanoSep 5, 2009
  5. Junio C HamanoSep 6, 2009
  6. Junio C HamanoSep 6, 2009
  7. Linus TorvaldsSep 6, 2009
  8. Junio C HamanoSep 6, 2009
  9. Linus TorvaldsSep 6, 2009
  10. Junio C HamanoSep 6, 2009
  11. Linus TorvaldsSep 6, 2009
  12. Linus TorvaldsSep 6, 2009
  13. Junio C HamanoSep 6, 2009
  14. Linus TorvaldsSep 6, 2009
  15. Linus TorvaldsSep 6, 2009
  16. Junio C HamanoSep 6, 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.