I have hit a case in which merge
silently ignores some changes from the merged branch, which I would expect (rebase
would take them).
Here is the case:
* merge slave into master: line not back |\ | * oops, was bad, put the line back (slave branch) | | | * slave branch, also delete the same line * | master branch, delete a line |/ * initial
When merging slave
into master
, the line remains removed, so the commit that put it back was not merged. A rebase would.
If the line was not removed but modified, this would be a conflict, which would be fine for me. A rebase would accept the line back, fine too. But skipping the commit with no warning at all... I would like to know for which cases it was designed so.
NB: Searching the web for similar questions found many... but all concerning whole files that were removed before being merged. I can admit reasons for this, even if I would prefer a conflict (rather than losing a commit). However, for changes inside a file, I find this more disturbing, and found no mention.
NB: I checked it on Mercurial, same result, this is not specific to Git.