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

Re: [PATCH] git-submodule: Remove duplicate entries during merge with conflict

From
Jens Lehmann <jens.lehmann@web.de>
Date
Jul 15, 2011, 21:41 UTC
Message-ID
<4E20B415.8030004@web.de>
In-Reply-To
<1F026B57884A5841B330471696849DE9113122B5@MBX021-W4-CA-5.exch021.domain.local>
Am 15.07.2011 22:32, schrieb Marlene Cote:
> How would you find an appropriate commit?

The same way you resolve conflicts for a regular file: If you are unlucky and the merge strategy doesn't resolve the conflict for you automatically (or at least gives you a hint what /could/ be the resolution), you have to use human judgment to find an appropriate resolution. In most cases that will be a commit where both conflicting commits show up in the history (and maybe you'll even have to create one yourself by doing a proper merge in the submodule).

Where I work we have a simple best practice that guarantees us git will always find a proper resolution itself: We only record commits that are on the submodules master branch in the superproject. To put it in other words: merge the submodule first before you commit in the superproject.

Previous: Marlene Cote
Message 14 of 14 in “git-submodule: Remove duplicate entries during merge with conflict”
  1. git-submodule: Remove duplicate entries during merge with conflictNicolas Morey-Chaisemartin, Mar 17, 2011
  2. Junio C HamanoMar 17, 2011
  3. Junio C HamanoMar 17, 2011
  4. Nicolas Morey-ChaisemartinMar 21, 2011
  5. Jens LehmannMar 21, 2011
  6. Jens LehmannMar 21, 2011
  7. Junio C HamanoMar 21, 2011
  8. Nicolas Morey-ChaisemartinMar 21, 2011
  9. Jens LehmannMar 21, 2011
  10. Nicolas Morey-ChaisemartinMar 22, 2011
  11. funeeldyJul 14, 2011
  12. Jens LehmannJul 15, 2011
  13. Marlene CoteJul 15, 2011
  14. Jens LehmannJul 15, 2011

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.