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

Re: Merge conflict when lines next to each other are changed

From
Jean-Noël Avila <avila.jn@gmail.com>
Date
Dec 3, 2021, 07:13 UTC
Message-ID
<78fd768d-6248-556c-4b74-7e35bb09a197@gmail.com>
In-Reply-To
<A5C94370-A9D0-43B2-9B32-0935703BCC94@yeplaa.net>
Le 01/12/2021 à 10:30, Loic Fouray a écrit :
Show 20 quoted lines
> Hi,
>
> In a file, I have this 2 lines one below the other:
>
> Repository: myvalue
> Tag: 8.2.10
>
> On my local branch i have updated repository myvalue.
> On the upstream repo, they updated often the tag value (not updated of my side).
>
> When i perform a merge from upstream to local branch, i have a conflit. 
> It seems that it’s related to neighboring lines. 
> Could you confirm that it ‘s a normal git operation?
>
> Also, i need to automate this merge. Is It possible with git tools to avoid this conflict or to resolv this conflict automatically?
>
> Thanks for tour help
> Loïc 
>
>
Hi,
This is a use-case for git attribute "merge" :
https://git-scm.com/docs/gitattributes#_performing_a_three_way_merge
BR
Jean-Noël
Previous: rsbecker@nexbridge.comNext: Loic Fouray
Message 7 of 8 in “Merge conflict when lines next to each other are changed”
  1. Loic FourayDec 1, 2021
  2. rsbecker@nexbridge.comDec 1, 2021
  3. Loic FourayDec 1, 2021
  4. rsbecker@nexbridge.comDec 1, 2021
  5. Loic FourayDec 3, 2021
  6. rsbecker@nexbridge.comDec 3, 2021
  7. Jean-Noël AvilaDec 3, 2021
  8. Loic FourayDec 3, 2021

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.