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

Re: How to re-merge paths differently?

From
Philip Oakley <philipoakley@iee.org>
Date
Oct 28, 2017, 17:37 UTC
Message-ID
<3655514352684AD398D17E83FF47F986@PhilipOakley>
In-Reply-To
<87wp3g61ez.fsf@javad.com>
From: "Sergey Organov" <sorganov@gmail.com>
Show 11 quoted lines
> Is there anything like this:
>
> $ git merge b
> [... lot of conflicts ...]
> $ git re-merge -X ours -- x/   # Leaves 0 conflicts in x/
> $ git re-merge -X theirs -- y/ # Leaves 0 conflicts in y/
> [... resolve the rest of conflicts manually ...]
> $ git commit
>
> [*] I do mean '-X' above, not '-s'.
>

By this I presume you mean that you have paths x and y that ate the ones with conflicts within them following the `git merge b`.

You then want a variant of the `git merge` command that will apply the `-X ours` policy *specifically to path x* so that its particular set of conflicts is fully resolved in favour of 'ours'.

You then want to repeat those path specific resolutions, on a path by path basis, to either `-X ours` or `-X theirs` until they are done.

You are also expecting that one or two conflicts will require to be fully manually resolved, until finally you can commit the result.

Would that be right?

Also, how do you intend to identify the 'x' and the 'y' paths, so that you can chose the ours/theirs/manual selection? (e.g. do you pre-know a regex/blob expansion)

The answer for individual paths is probably in the mergetool of your choice. -- Philip

Previous: Sergey OrganovNext: Philip Oakley
Message 2 of 4 in “How to re-merge paths differently?”
  1. Sergey OrganovOct 27, 2017
  2. Philip OakleyOct 28, 2017
  3. Philip OakleyOct 28, 2017
  4. Sergey OrganovOct 30, 2017

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.