- Java EE 8 Development with Eclipse
- Ram Kulkarni
- 210字
- 2025-04-04 16:37:02
Committing a project to a remote repository
So far, we have been working in the local Git repository. But you may want to push your project to a remote repository if you want to share your code and/or make sure that you do not lose your local changes. So in this section, we will learn how to push a local project to a remote Git repository. If you do not have access to a Git repository, you could create one at http://www.github.com.
- Create a new repository in the remote Git server, named GitPluginTest.
- In the Git Repositories view, right-click on the Remotes node and select the Create Remote... option:

Figure 3.28: Adding a remote Git repository
- By convention, name of the remote repository is origin. Click OK. In the next page, set up the configuration for push. Click on the Change button next to the URI textbox:

Figure 3.29: Setting up a remote Git URI
- Enter the URI of the remote Git repository. The wizard extracts host, repository path, and protocol from the URI. Enter your user ID and password and click Finish:

Figure 3.30: Configuring a Git push
- Click Save and Push. This sends files in the local master branch to the remote Git repository.