Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Egit Not Detecting Changed Files

Tags:

eclipse

egit

I have been using Egit and Eclipse together for well over a year. I recently upgraded my computer and had to reinstall everything. Previously whenever I would make a change to a file it would immediately get picked up by Egit and show with the red highlight and star next to the file name in the project explorer.

I have everything back up and running exactly as it was, however whenever I make a change the change is not picked up by Egit. I have to perform a 'git status' in order for the files to show as ready to be staged in the file explorer. Am I doing something wrong to have Egit automatically detect changed files and has anyone else had this problem?

like image 222
Jeff Thomas Avatar asked May 10 '12 18:05

Jeff Thomas


People also ask

How do I see changed files in eclipse?

In the Eclipse Navigator view (or any Eclipse view that supports Team operations), right-click the file or folder and click Team > Show History.

How do you stage unstaged changes in Eclipse?

Open one of your files, make a change, and you should see it appear in the Git Staging view in the Unstaged Changes window. Drag it into the Staged Changes area, add a commit message, and click Commit. You can also use the Team menu; right-click on the file, choose Team -> Add to Index, then Commit.


2 Answers

I had a similar issue where all my changes just disappeared. Somehow, Eclipse had unselected my Git repository. Once I selected it again, they all came back.

enter image description here

like image 91
Craigo Avatar answered Oct 06 '22 19:10

Craigo


What I've found is that you need to make sure that your git repositories are showing up in the Eclipse Git Repositories view.

  1. In the repositories view, you click on the [very] little Git icon with a green + (plus) sign to Add and Existing Local Git Repository.
  2. Browse to the directory that already has a .git subdir and click Finish. You should then see you local repo show up in that list.
  3. Then you can right click on the repo while still in the repositories view and add pull down to Import Projects.
  4. "Import existing projects" is selected. Click Next.
  5. Your project should be checked off. Add it to a working set if necessary. Click Next (maybe Finish).
like image 32
Gray Avatar answered Oct 06 '22 19:10

Gray