This is similar to #3 , only this time the file is completed deleted on one branch - but is still renamed and / or moved on the other, possibly with some minor editing.
This is handled by git merge nicely:
For a conflict between a renamed / moved file without edits and a deletion, it writes a stage entry for 'our' version of the file only. git status --porcelain says AU for the renamed / moved file.
For a conflict between an edited and renamed / moved file and a deletion, it writes stage entries for the common base form of the file, 'our' version of the file, but leaves the conflicting deletion implied as there is neither a path nor any content for the deleted form. git status --porcelain says UD for the renamed / moved file.
Out of scope for this is what happens when a file split on one branch (possibly with edits in either part) and deleted outright on another. That is for another story.
This is similar to #3 , only this time the file is completed deleted on one branch - but is still renamed and / or moved on the other, possibly with some minor editing.
This is handled by
git merge
nicely:git status --porcelain
saysAU
for the renamed / moved file.git status --porcelain
saysUD
for the renamed / moved file.Out of scope for this is what happens when a file split on one branch (possibly with edits in either part) and deleted outright on another. That is for another story.