如何解决推送被拒绝,并要求拉时拉动结果“一切都是最新的”? [英] How to fix the pushing rejected and asked to pull when pulling results in "everything is up to date"?
问题描述
使用EGit与Eclipse,当我尝试将我的代码推入远程存储库我收到一个错误消息,说我应该先拉,如图所示。
如何解决这个问题?
确保:
- 您正在使用最新版本的EGit(2.3 +)
- 您在拉之前已经保存/提交所有内容(如这个线程)
- 你不是处于分离的头部模式(如无法使用EGit推上游)
最后我注意到在
DIRTY_WORKTREE
错误消息中提到了一个类文件。
I从文件系统中删除该文件,做了一个拉,解决冲突并推送。
一切似乎都可以正常工作。
Using EGit with Eclipse when I try to push my code into the remote repository I get an error message saying that I should pull first, as shown in Figure 1.
When I then try to pull from the remote repository I get a message saying that everything is up to date, as shown in Figure 2.
How do I fix this problem?
Make sure that:
- you are using the latest version of EGit (2.3+)
- you have stashed/commit everything before pulling (as in this thread)
- you are not in a detached head mode (as in "can't push upstream using EGit")
in the end I noticed a class file was mentioned in the
DIRTY_WORKTREE
error message.
I deleted that file from the file system, did a pull, resolved the conflicts and pushed.
Everything seems to work fine now.
这篇关于如何解决推送被拒绝,并要求拉时拉动结果“一切都是最新的”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!