if you're dealing with a merge conflict in Git like this, how do you figure out which side the of the conflict comes from which branch? (you can pick more than one)
FRUITS = [
"apple",
<<<<<<< HEAD
"cherry",
=======
"banana",
>>>>>>> add-fruit
"orange",
]
@b0rk I guess...extended "look at the branch name" and run `git show` against the named things, giving each side of the tree and hopefully a little more context what is going on.
@b0rk it's just an awful situation. i keep thinking "does HEAD indicate the change i am attempting to apply, unnamed because it's as-yet uncommitted, or is it just the state of some tree whose name I don't care about"
@wingo i'm trying to think about what Git's official documentation should say about this situation other than "idk it sucks" haha
@b0rk My “other” is “get confused, probably get it wrong at least once, and abort/redo the rebase/merge”.
@b0rk For me, it's either a conflict that I can easily resolve and I don't have to think about where things come from, or I basically open another terminal window and I look at previous commits.
@suetanvil @benjamingeer @b0rk @wingo also, some form of three-way diff should be the default. it is so much easier to figure out what _should_ be there, with the additional context of "this is what it was like before either side of the merge started messing with it".