Comment by pwdisswordfishy
1 month ago
New to me was discovering within the last month that git-merge doesn't have a merge strategy of "null": don't try to resolve any merge conflicts, because I've already taken care of them; just know that this is a merge between the current branch and the one specified on the command-line, so be a dutiful little tool and just add it to your records. Don't try to "help". Don't fuck with the index or the worktree. Just record that this is happening. That's it. Nothing else.
Doesn't `git merge -s ours` do this?
What does that even mean? There already is reset hard.
The name "null" is confusing; you have to pick something. However, I think what is desired here is the "theirs" strategy, i.e. to replace the current branch's tree entirely with the incoming branch's tree. The end result would be similar to a hard reset onto the incoming branch, except that it would also create a merge commit. Unfortunately, the "theirs" strategy does not exist, even though the "ours" strategy does exist, apparently to avoid confusion with the "theirs" option [1], but it is possible to emulate it with a sequence of commands [2].
[1]: https://git-scm.com/docs/merge-strategies#Documentation/merg...
[2]: https://stackoverflow.com/a/4969679/814422
What do you mean, "What does it mean?" It means what I wrote.
> There already is reset hard.
That's not... remotely relevant? What does that have to do with merging? We're talking about merging.
Neither of these are answers or explainations. So you said nothing, and then said nothing again.
I also "mean what I wrote". Man that was sure easy to say. It's almost like saying nothing at all. Which is anyone's righ to do, but it's not an argument, nor a definition of terms, nor communication at all. Well, it does communicate one thing.
10 replies →