To be able to collaborate on your Git project, you need to configure remote repositories that you pull data from and push to when you need to share your work.

If you have cloned a remote Git repository, for example from GitHub, the remote is configured automatically and you do not have to specify it when you want to synchronize with it (i.e. when you perform a pull or a push operation).

If you've cloned your repository, the default name Git gives to the server you've cloned from is origin.

However, if you create a Git repository by choosing VCS | Import into Version Control | Create Git Repository from the main menu, you need to add a remote repository to be able to push your commits and pull data from it.

To add a remote

  1. From the main menu, choose VCS | Git | Remotes. The Git Remotes dialog will open.
  2. Click the Add button add on the toolbar or press ⌘N, ⌃⏎, ⌘N or ⌃⏎⌃N, ⌃⏎, ⌃N or ⌃⏎⌘N, ⌃⏎, ⌘N or ⌃⏎⌥ Insert⌥ Insert.
  3. In the dialog that opens, specify the remote name and URL and click OK.

If you have not configured any remotes and you invoke the Push Dialog to push your commits, the Define remote link will appear instead of a remote name. Click it to add a remote. Note that you can also add a remote from the Push dialog by clicking an existing remote's name.

To remove a remote that is no longer valid

  1. From the main menu, choose VCS | Git | Remotes. The Git Remotes dialog will open.
  2. Select the remote you want to remove and click the Remove button delete on the toolbar, or press ⌘⌦ or ⌘⌦⌘⌦ or ⌘⌦⌥ Delete, ⌥⌦ or ⌥⌦.

To edit a remote

  1. From the main menu, choose VCS | Git | Remotes. The Git Remotes dialog will open.
  2. Select the remote you want to edit and click the Edit button edit on the toolbar, or press or or or Enter, or Enter, ^ M, , ⌃M, or ⌃M.
  3. In the dialog that opens edit the remote's name and URL as required.

You can also edit a remote from the Push Dialog by clicking its name.