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

Re: Merging a branch when I don't want conflicts

From
Johannes Sixt <j.sixt@viscovery.net>
Date
May 18, 2009, 09:01 UTC
Message-ID
<4A112404.6060004@viscovery.net>
In-Reply-To
<93c3eada0905180105n641614eodb0469dceca20bc9@mail.gmail.com>
Geoff Russell schrieb:
Show 6 quoted lines
> The file is data coming out of an interactive program which reads
> the entire file, edits and then writes the entire file at which point
> this file is correct
> and all previous versions are obsolete.  I don't really want a merge
> at all, but just
> want to replace the file in the master with the version on the branch.
Ah, so finally you say what you mean ;)

You can define a custom merge driver that always returns the content of the second branch. See 'man gitattributes'.

-- Hannes
Previous: Geoff RussellNext: Geoff Russell
Message 4 of 8 in “Merging a branch when I don't want conflicts”
  1. Geoff RussellMay 18, 2009
  2. Johannes SixtMay 18, 2009
  3. Geoff RussellMay 18, 2009
  4. Johannes SixtMay 18, 2009
  5. Geoff RussellMay 18, 2009
  6. Nanako ShiraishiMay 18, 2009
  7. Tay Ray ChuanMay 18, 2009
  8. Junio C HamanoMay 18, 2009

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.