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

Feature request: ability to pass merge strategy options to 'git checkout --merge'

From
ZSZachary Santer <zsanter@gmail.com>
Date
Feb 21, 2020, 18:33 UTC
Message-ID
<CABkLJUKaMwT+_AeUo+gdMF5ELEfZzxRqJ_dDhUpdXp2dGeE=8Q@mail.gmail.com>

Perhaps using a command like: git checkout --merge="-s recursive -Xpatience -Xignore-all-space" [<tree-ish>] [--] <pathspec>… for instance.

I'm merging two long-lived branches that I had no hand in developing. I used the following command to get started: git merge -s recursive -Xpatience -Xignore-all-space --no-commit <other branch>

I need to be able to quickly ensure that it is not the case that both branches implement the same behavior in different sections of the same file. In the case of a file that merged without conflicts, I've been doing the following, in order to use my merge tool: git checkout --merge <file> git mergetool <file> git add <file>

This allows me to quickly look over what each side of the merge added. However, it's also creating merge conflicts where there were none resulting from the original merge.

On the other hand, it would be more efficient from the user's perspective to be allowed to run mergetool on a file without merge conflicts from the get-go.

Still, this would undoubtedly be a useful feature in use cases besides my own.

Thank you, Zachary Santer

Message 1 of 1 in “Feature request: ability to pass merge strategy options to 'git checkout --merge'”
  1. Zachary SanterFeb 21, 2020

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.