Git does not apply deleted files when merging an old branch into the master. How can I tell Git to a

Posted Chuck Lu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Git does not apply deleted files when merging an old branch into the master. How can I tell Git to a相关的知识,希望对你有一定的参考价值。

Git does not apply deleted files when merging an old branch into the master. How can I tell Git to apply deleted files?

The only way I can fathom this possible situation is if you created two different files, each with the same filename, in independent branches.

 

我遇到的情况的是Branch5和Branch6基于同一个commit出来的分支,都包含文件A

Branch5删除了文件A

Branch6修改了文件A

在Branch6分支上合并Branch5,发现那个文件被显示为新增

符合上面说的情况,

 

如果Branch6没有修改文件的话,那么Branch5的删除操作应该会自动被合并到Branch6

 

以上是关于Git does not apply deleted files when merging an old branch into the master. How can I tell Git to a的主要内容,如果未能解决你的问题,请参考以下文章

git fatal: Paths with -a does not make sense.

Git:fatal: ‘upstream‘ does not appear to be a git repositoryfatal: Could not read from remote repos

git fatal: branch ‘master‘ does not exist

Git — 解决“requested upstream branch ‘origin/master‘ does not exist“

Git:在 Git 中推送提交时消息“src refspec master does not match any”

Git:错误:error:src refspec master does not match any