Jeff Thomas
Jeff Thomas

Reputation: 4816

Eclipse Egit Not Detecting Changed Files

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?

Upvotes: 10

Views: 35952

Answers (9)

Gray
Gray

Reputation: 116938

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

Edit: This just didn't work for me. What finally did work for me was to remove it from Eclipse entirely and reimport. The thing that I had to watch for was that it disappeared from the Git Staging view list. I had removed it from git but the staging list still had it showing up possibly with some incorrect attributes. Once it was removed from the staging list, I was able to then re-import it and all of the git change marks showed up.

enter image description here

Upvotes: 3

BrunoPanassi
BrunoPanassi

Reputation: 31

i just faced this problem by now, and i resolved by clicking in button Refresh in Git Staging: enter image description here

Upvotes: 0

Johan
Johan

Reputation: 435

I faced the same problem using eclipse version 2021.12. Whenever I made changes on file, the eclipse didn't detect it.

I solve it by using Intelij IDE.

Upvotes: 0

Venkat Thota
Venkat Thota

Reputation: 31

For me I have clicked Team --> Advanced --> No Assume Unchanged, fixed the issue

Upvotes: 3

Craigo
Craigo

Reputation: 3747

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

Upvotes: 2

Glo
Glo

Reputation: 1

I faced the same problem. From your git repository view: Right-click -> Show in git staging

Upvotes: 0

Priyanka
Priyanka

Reputation: 51

If you have already added your files to Stage then change the branch it will ask you to commit/stash/reset

Upvotes: 0

Matthias Sohn
Matthias Sohn

Reputation: 272

  • which version of EGit are you using
  • do you get the egit team menu if you right-click any resource in your git tracked project ?
  • if not then you need to do "Team > Share > Git", then check "Use or create repository in parent folder of project". If you are using a very recent nightly build version this will be checked automatically.
  • when you modify a file tracked by (e)git a text decorator ">" should appear in front of the modified file
  • as soon as you stage the modified file (Team > Add) the decorator should show the star
  • also the staging view should always show the git status for all modified files

Upvotes: 9

Eran Medan
Eran Medan

Reputation: 45775

You need to "Add to index" all files again probably

Track Changes
Click Team > Add on the project node. (This menu item may read Add to Index on recent versions of Egit)

(From the EGit docs:)

Upvotes: 3

Related Questions