如何解决推送被拒绝,并要求拉时拉动结果“一切都是最新的”? [英] How to fix the pushing rejected and asked to pull when pulling results in "everything is up to date"?

查看:168
本文介绍了如何解决推送被拒绝,并要求拉时拉动结果“一切都是最新的”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用EGit与Eclipse,当我尝试将我的代码推入远程存储库我收到一个错误消息,说我应该先拉,如图所示。





如何解决这个问题?

解决方案

确保:




  • 您正在使用最新版本的EGit(2.3 +)

  • 您在拉之前已经保存/提交所有内容(如这个线程

  • 你不是处于分离的头部模式(如无法使用EGit推上游






OP Krige 添加


最后我注意到在 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:


The OP Krige adds:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆