1

Consider the following scenario:

  • a topic branch started with commit A
  • at commit B on topic branch, a utility script file was created
  • since commit B, that file has been revised by multiple commits to topic
  • I decided that its final form developed in topic will be useful for the master branch
  • when rebasing topic on master, I want to avoid multiple conflicts involving all the edits to this file that happened between commit B and topic's head; I want to express the following intention: "Hey git, whenever you see a conflict involving this file during rebasing topic onto master, automatically resolve it by using the version from master"

How do I?

Szczepan Hołyszewski
  • 2,707
  • 2
  • 25
  • 39
  • Read about strategies called `ours` and `theirs` and choose the appropriate one in your case. – 0andriy Apr 05 '20 at 18:28
  • `ours` and `theirs` are THE most broken concepts in git. They are moving targets. It is not humanly possible to memorize which is which in which situation (merge vs rebase vs several options that can affect the meaning of `ours` and `theirs`). I refuse to acknowledge the existence of this utterly broken feature. It is like "credit" and "debet" in accounting: notions that originally made sense but then the entirety of accounting developed away from that sense. – Szczepan Hołyszewski Apr 11 '20 at 21:14
  • Not many complains. If you think so, just fix and send patch upstream, that's how open source works. – 0andriy Apr 11 '20 at 21:24

0 Answers0