无法使用Eclipse EGit提交文件 [英] Can't commit files with Eclipse EGit

查看:133
本文介绍了无法使用Eclipse EGit提交文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我尝试提交文件时,EGit都会说没有要提交的文件,尽管文件是根据项目资源管理器中的图标进行暂存的(见图)

Whenever I try to commit a file EGit says "no files to commit", though the file is staged for commit according to its icon in Project Explorer (see the image)

到我项目中的任何文件。我究竟做错了什么?我正在使用EGit 0.11.1。

This happens to any file in my project. What am I doing wrong? I'm using EGit 0.11.1.

编辑:

已更新为1.2.0成功了,谢谢大家!

Updated to 1.2.0 and it worked, thank you all!

推荐答案

OP asd ,EGit0.11.1是不是最新版本

Egit 1.2-SNAPSHOT(可通过每晚更新站点)解决了该问题。

As mentioned by the OP asd, EGit0.11.1 is not the latest version:
The Egit 1.2-SNAPSHOT (available through the nightly update site) solves the problem.


一般而言,EGit承诺至少支持最新的两个Eclipse版本(截至2011年10月,该版本为3.6.2 Helios SR2和3.7.1 Indigo SR1)。

In general EGit promises to support at least the latest two Eclipse releases (as of this writing in Oct 2011 this is 3.6.2 "Helios SR2" and 3.7.1 "Indigo SR1").



< hr>

作为参考,我的原始答案是:


For reference, my original answer was:

有可能,如错误341679 ,可以在不创建本地分支的情况下签出远程分支(或标记)。

如果您处于这种情况,则说明您在< a href = https://stackoverflow.com/questions/999907/git-push-says-everything-to-date-even-though-i-have-local-changes/1000009#1000009>分离的HEAD ,这将解释没有要提交的文件消息。

It is possible, as shown in bug 341679 to checkout a remote branch (or a tag), without creating a local branch.
If you are in this situation, then you are working in a detached HEAD, which would explain the "no files to commit" message.

请参见 Git课:请注意头部无头,并查看您的历史记录不显示HEAD指针:

See "Git Lesson: Be mindful of a detached head" for more, and check if your history doesn't display a HEAD pointer:


好消息是您可以通过创建新分支来快速解决此问题。

在egit中,这很简单,就像 Team->切换至->新分支。现在,所有这些分离的提交都将驻留在新分支(new_idea)上。

The good news is that you can quickly fix this problem by creating a new branch.
In egit, this is as simple as Team -> Switch To -> New Branch. Now, all these ‘detached commits’ will live on the new branch (new_idea).

这篇关于无法使用Eclipse EGit提交文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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