0

My current git process is as follows: I've got two special branches. A branch "originalCode" and a branch "forkedCode". Each time I want to add a feature Foo to the project I'm forking, I create a branch "featureFoo", starting at originalCode, and I implement my feature. This way, while I debug, I'm sure that any bug I find is either in original code (unlikely), or related to this particular feature. I also have a file which simply list the features implemented in the fork and not in the original software.

Once I believe that the feature works, I merge it into forkedCode. Sadly, here, I always have the same problem, my list of features have a merge conflict. Indeed, git does not know where in the list the new element should be added. Personally, I don't care. I currently sort everything alphabetically, but it's not even important. I would like to tell git «in this file precisely, your merge is always to take everything from the two branches you are merging in an arbitrary order, I don't care». Is there a way to do it ? Worse, even with rerere activated, for some reason, it seems that Git does not recall how to merge those lists. (Sometime I replay the merges in order to have a cleaner tree. Actually sometime I replay all of the merges after rebasing my features onto an updated version of originalCode.)

Arthur Rainbow
  • 216
  • 1
  • 8
  • I don't know what the word `anki` above means, but Git does offer the ability to do union merge via `.gitattributes`: see https://stackoverflow.com/q/22109586/1256452. – torek Aug 07 '19 at 09:40
  • @torek: I meant «git». Anki is the software I'm forking, it has nothing to do here. – Arthur Rainbow Aug 07 '19 at 13:10

0 Answers0