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.

  1. Create a new repository in the remote Git server, named GitPluginTest.
  2. 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
  1. 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
  1. 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
  1. Click Save and Push. This sends files in the local master branch to the remote Git repository.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.237.131