Essentially, I'd like to tag a commit as only formatting, so any conflicts should be solved with a theirs strategy.
Asked
Active
Viewed 244 times
1
-
What? not clear what you want? – CodeWizard Feb 18 '16 at 23:53
-
You just want to mark commit in some way? – CodeWizard Feb 18 '16 at 23:54
-
I assume you want an automatic way as you could just mark the tag itself with a special "code" like FORMAT_ONLY to the end of the tag. – ArchiFloyd Feb 19 '16 at 00:00
-
@ArchiFloyd yes. So that when rebasing, or merging it'd just ignore that file automatically. I don't think that there is a way to do it, though something might be able to be hacked with rerere. – Jacob Eggers Feb 19 '16 at 00:22
-
I'd think the thing to do is have a formatting-only _branch_ and merge other work into it. – jthill Feb 19 '16 at 07:22
-
Very manual after-the-fact solution but perhaps worth mentioning [`git blame --ignore-rev`](https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revltrevgt). – Janosh Nov 08 '22 at 03:29
1 Answers
2
Long story short: no, you can't.
While you could set up a merge rule for certain files, you cannot do this for a certain commit.