3

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)

enter image description here

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

EDIT:

Updated to 1.2.0 and it worked, thank you all!

szx
  • 6,433
  • 6
  • 46
  • 67
  • You may also want to consider upgrading your EGit version. Current release version is 1.1.0, and since 0.11.1 many bugs were fixed. – dunni Oct 31 '11 at 10:50

1 Answers1

1

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.

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").


For reference, my original answer was:

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.

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

no head

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).

new branch

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Unfortunately this it not my case, I do have a local branch (created outside of Eclipse), but thanks anyway. BTW the problem is gone after an update to 1.2.0. – szx Oct 31 '11 at 12:08
  • @asd Ok. I have included your conclusion in this answer. – VonC Oct 31 '11 at 12:21