What does the option "Auto share projects located in git repository" of EGit mean?

PCJ picture PCJ · Jun 17, 2015 · Viewed 21.7k times · Source

Every time I import a maven project. Among the remaining tasks to be done always appears Auto share git project (waiting).

I dig in the web and I just find where enable/disable the option, but I want to understand what is doing and if I need it.

What I always do is create/clone the project in command line and then import it in Eclipse, then I can do all the git work in EGit.

Is the Auto share projects located in git repository option necessary in this scenario or I can disable it?

Answer

Rüdiger Herrmann picture Rüdiger Herrmann · Oct 30, 2015

In Short: Yes the option is necessary, otherwise you will have to manually share the project with the repository it belongs to.

The option Auto share projects located in Git repository usually saves you the extra step of sharing the created or imported project with a repository.

A project that belongs to a certain repository (in Git: is located within the work directory) needs to be marked as such. Therefore you would open the projects context menu, go to Team > Share Project and select the repository.

Only thereafter you will see decorations (e.g. current branch) and be able to commit changes of that project etc.

Whenever a project is created or imported that is located within the work directory of a repository known to EGit, it will be automatically be shared if the above option is enabled.