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

[Feature request] autoresolve modify/delete conflict via .gitattributes merge= attribute

From
IBilya Basin <basinilya@gmail.com>
Date
Nov 6, 2024, 11:56 UTC
Message-ID
<f1a8afe2-df78-40d9-9866-d49dc4057806@gmail.com>

Hi. This is also described in this SO question: https://stackoverflow.com/questions/58767528/how-to-specify-a-git-merge-ours-strategy-with-gitattributes-for-deleted-files

Our proprietary IDE generates theme-cache/web/theme.compiled.css and the contents are different on different machines.
This file was supposed to be in .gitignore, but it slipped into the repo.
I was trying to remove the file, but other developers silently re-introduce it into the repo. Here's what happens:
- The proprietary IDE re-generates the file and makes a local commit.
- The IDE does "pull --rebase" which results in a "deleted by us" conflict
- The IDE immediately re-generates the file, clearing the conflicted state
- Even though it's in .gitignore, the file remains under version control because of the cherry-pick by rebase
I was hoping that adding a certain merge= attribute for this file would help, but apparently it only considered when two files are merged, not when one is deleted.
Next: brian m. carlson
Message 1 of 2 in “[Feature request] autoresolve modify/delete conflict via .gitattributes merge= attribute”
  1. ilya BasinNov 6, 2024
  2. brian m. carlsonNov 7, 2024

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.