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
原文地址:https://www.cnblogs.com/chucklu/p/12552808.html
时间: 2024-10-15 16:25:14