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

conflict markers not documented

From
AFAlan M. Feldstein <alan@alanfeldstein.com>
Date
Sep 2, 2007, 18:32 UTC
Message-ID
<46DB01BC.8030606@alanfeldstein.com>
I can't find Git conflict markers documented anywhere. If I do
    git pull git://icarus.com/~steve-icarus/verilog v0_8-branch
that results in files marked like this, for example
    <<<<<<< HEAD:Attrib.cc
    #ident "$Id: Attrib.cc,v 1.5 2002/08/12 01:34:58 steve Exp $"
    =======
    #ident "$Id: Attrib.cc,v 1.6 2004/02/20 18:53:33 steve Exp $"
     >>>>>>> f600e774d54f14d2cc2848ea5ef663233f8a6f6e:Attrib.cc

The git-pull(1) Manual Page <http://www.kernel.org/pub/software/scm/git/docs/git-pull.html> mentions conflicts in three places, but fails to document the markers or lead me to a page that does. The closest thing I've found is Git User's Manual (for version 1.5.3 or newer) <http://www.kernel.org/pub/software/scm/git/docs/user-manual.html> with

    <<<<<<< HEAD:file.txt
    Hello world
    =======
    Goodbye
     >>>>>>> 77976da35a11db4580b80ae27e8d65caf5208086:file.txt

but it fails to explain which is which, only stating that "All you need to do is edit the files to resolve the conflicts ...". That's not enough information.

In _Essential CVS_ by Jennifer Vesperman, she documents (even more clearly than the Cederqvist) CVS conflict markers like this

    <<<<<<< filename
    sandbox content
    =======
    repository content
     >>>>>>> revision
 >From this, I can infer that
    #ident "$Id: Attrib.cc,v 1.5 2002/08/12 01:34:58 steve Exp $"
was my Git repository content and
    #ident "$Id: Attrib.cc,v 1.6 2004/02/20 18:53:33 steve Exp $"
was the other repository content (from which I fetched).

But I shouldn't need to refer to a CVS book to understand Git. Git's documentation should have made this clear. So I'm not writing this to ask for confirmation of my inference from the Git mailing list. I'm writing this to ask that the Git documentation be improved to adequately explain conflict markers.

-- 
Alan Feldstein

Cosmic Horizon logo

http://www.alanfeldstein.com/

+1 585 415 6682
Message 1 of 1 in “conflict markers not documented”
  1. Alan M. FeldsteinSep 2, 2007

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.