问题描述
我无法在我的生活中找到任何有关git有时会吐出的[file]:needs update消息的正确解释。即使官方的git常见问题也解释了这个标记为TODO。如果有人能解释A)它是什么意思;和B)如何解决它,我将非常感激。
I can't for the life of me find any decent explanation of the "[file]: needs update" message that git sometimes spits out from time to time. Even the official git FAQ has explaining this marked as a TODO. If someone could explain A) what it means; and B) how to fix it, I would be extremely grateful.
推荐答案
这意味着你试图从某处合并更改,但这些更改包括修改脏的文件(目前在工作树中进行了修改)。您需要提交未完成的更改,或存储它们,提取/重新整合/合并/您正在进行更新的任何内容,以及清空
It means you're trying to merge changes from somewhere, but the changes include modifications to a file that's dirty (currently modified in your working tree). You need to commit your outstanding changes, or stash them, pull/rebase/merge/whatever you're doing to update, and unstash
这篇关于git说文件“需要更新”是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!