Eclipse Git plugin
Recent versions of Eclipse are pre-installed with Eclipse Git plugin (EGit). If not, you can install the plugin from Eclipse Marketplace
. Select the Help
| Eclipse Marketplace...
option and type egit
in the Find
textbox:
Figure 3.16: Searching the EGit plugin in Eclipse Marketplace
If the plugin is already installed, it will be marked as Installed
.
Adding a project to Git
Git is a distributed repository. Unlike some of the other source management systems, Git maintains the complete local repository too. So you can perform activities such as check-out and check-in in the local repository without connecting to any remote repository. When you are ready to move your code to a remote repository, you can connect to it and push your files to the remote repository.
Note
If you are new to Git, take a look at the following documentation and tutorial:https://git-scm.com/doc and https://www.atlassian.com/git/tutorials/.
To learn how to add a project to Git, let's create a simple Java project...