10

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?

9 Answers 9

8
  • 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
1
  • Thanks, @Matthias. A computer crash appeared to have caused Git to stop tracking a project of mine in Eclipse. Your simple procedure fixed it.
    – Trevor
    Commented Sep 23, 2012 at 19:48
3

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

3

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).
1
  • removing my existing project, and following above to import the project again using above steps did the trick for me. Thanks.
    – zookastos
    Commented Sep 12, 2019 at 3:13
3

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

2
  • I agree - this also worked for me. As a side note, this is not strictly just an Eclipse issue. Git didn't see these files as modified, either ("git status" didn't show them as modified) Commented Jul 31, 2023 at 16:04
  • This worked for me, after filtering through so many "your path is in .gitignore" "solutions", which wasn't the case.
    – Dale
    Commented Apr 5 at 0:04
2

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

0
0

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

0

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

0

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.

0

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.