If:
- You expected/hoped that Git would detect the move or rename of the file on trunk, but it didn't, and
- Your repository has a reasonable number of files
... then you should definitely consider changing your git config like this:
$ git config merge.renameLimit 999999
It is possible that during a merge/cherry-pick, git is hitting the default file check-limit (I think it's 400 or 1000 or something like that) before it is able to locate the suitable rename match. Upping this limit may cause merge/cherry-pick to take longer while it searches for your renamed file, but it can help avoid "deleted by us" merge-challenges.
That should do the trick, but if your renamed file was small and the changes between branches is significant, you might also play with the -X rename-threshold
setting, e.g. lowering it from the default 50% with -X rename-threshold=25%
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…