gpt4 book ai didi

git 冲突 - 文件在 HEAD 中删除并在修订中修改

转载 作者:太空狗 更新时间:2023-10-29 12:50:16 24 4
gpt4 key购买 nike

刚接触 git,有一点问题我不知道如何解决。我错误地更改了工作副本中的一个文件,但没有提交更改。然后我对另一个副本进行了更改并提交了它们——当我试图提取更改时,我不出所料地收到一个错误,说我“对文件的本地更改将被 merge 覆盖,中止”。所以我使用 git rm 删除了有问题的文件,然后使用 git add -u 并提交了删除。然后我试图 pull 入最新的副本并得到以下内容。处理这个问题的最佳方法是什么?感谢任何指点

CONFLICT (delete/modify): wp-content/plugins/wp-flash-countdown/xml_option_.xml deleted in HEAD and modified in ba878ab1efe3a039961a446c490d5c93a2bc22e1. Version ba878ab1efe3a039961a446c490d5c93a2bc22e1 of wp-content/plugins/wp-flash-countdown/xml_option_.xml left in tree.
Automatic merge failed; fix conflicts and then commit the result.

最佳答案

如果您现在执行 git status,其输出包含:

# Unmerged paths:
# (use "git add/rm <file>..." as appropriate to mark resolution)

如果你 git rm 它们,将输出一个 needs merge 警告,但是删除仍然会成功,然后你可以提交修改 - 这将是“merge ”提交”。

关于git 冲突 - 文件在 HEAD 中删除并在修订中修改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12809783/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com