pH Cito pH Cito - 1 month ago 6
Git Question

Egit staging view shows ignored resources

I have a new Git project in my Eclipse and the Staging View's Unstaged Changes panel shows not only the file I'm working on, but also

.classpath
and
.project
, while these are set to be ignored in Eclipse's Preferences > Team > Ignored Resources. How come?

NB: whether or not it's a good idea to ignore
.classpath
and
.project
is out of the scope of this question.

Answer

while these are set to be ignored in Eclipse's Preferences > Team > Ignored Resources

This has nothing to do with Git or Git-related Eclipse views like Staging View's Unstaged Changes panel.

You would need to put those filenames into a .gitignore in order for them to not appear in that panel.

Then switch back to your Eclipse, and see if the Staging View's Unstaged Changes panel has still elements it should not display.

You can check if an untracked file is actually ignored with:

git check-ignore -v -- .classpath
Comments