From: ilya Basin <basinilya@gmail.com>
To: git@vger.kernel.org
Subject: [Feature request] autoresolve modify/delete conflict via .gitattributes merge= attribute
Date: Wed, 6 Nov 2024 14:56:06 +0300 [thread overview]
Message-ID: <f1a8afe2-df78-40d9-9866-d49dc4057806@gmail.com> (raw)
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 reply other threads:[~2024-11-06 11:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 11:56 ilya Basin [this message]
2024-11-07 0:34 ` [Feature request] autoresolve modify/delete conflict via .gitattributes merge= attribute brian m. carlson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f1a8afe2-df78-40d9-9866-d49dc4057806@gmail.com \
--to=basinilya@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).