Joel Min
Joel Min

Reputation: 3457

No files changed but Git Eclipse project explorer indicates there are

Eclipse indicates I have files changed under my project root folder, but clearly there aren't any. To help you see the issue I've attached a screen shot below

enter image description here

See that > mark next to my project root folder? That indicates I have changed files, but none of the sub-folders have that mark. This is important because now it does not let me switch to another branch unless the changes are committed.

Here's the steps to reproduce my problem (at least how it happened on my machine):

  1. I was originally in my local branch which is a clone of remote origin/develop branch.
  2. I created a new feature branch and checked it out.
  3. Worked on some features, then committed the changes to origin/develop branch.
  4. Switched back to my local develop branch (where I was at in the beginning). Only to find out that the files I've changed in the feature branch are all marked as changed by the > mark, but if I look into the files they are identical to the remote origin/develop branch that I cloned off before - NOT CHANGED.
  5. Now it does not allow me to checkout other branches unless I commit these "changed files". So I did a hard reset on it, but still the marks are there and eclipse won't let me switch branch.
  6. I got mad, did a pull from origin/develop. Then finally all > marks are gone except for the one pointing to my project root folder.
  7. If I switch to the feature branch I worked on again and then switch back to local develop, everything goes back to step 4.

Is this an Eclipse related issue? Or is there something I did wrong? Please help, I'm lost!

Upvotes: 0

Views: 280

Answers (1)

Sumit Singh
Sumit Singh

Reputation: 15886

As i can see from your image there is one untracked file in your project thats why you are getting > sign on root of your project.

To clean it:

  1. Open Git Repository View in eclipse.
  2. Right Click select clean
  3. Select all the files and choose Finish

enter image description here

Upvotes: 1

Related Questions