Games Brainiac Games Brainiac - 1 month ago 18
Git Question

Adding a remote git repo through intelliJ

I want to know how to add a remote git repo via intelliJ, not through the git bash. Now, from what I've seen in this tutorial, it can be done, but whenever I try to push, the dialogue never comes up. If you push to the very bottom, you can see that it can be done in probably a previous version of IntelliJ. How can you do it with version 12 or rather PyCharm 2.6?

Answer

UPDATE: this feature is available since 2016.3 version.

VCS | Git | Remotes | Add (Alt+Insert).

git remotes


Original answer:

You can choose from the existing remotes, but you can't add new remotes from the UI, there is a feature request:

  • IDEA-87099 Provide ability to add remote repositories to local git repository

The workaround, for those new to Git is to use the commandline and add a remote like so:

git remote add remoteName remoteUrl

After that, the remote will show up in the pull dialog in Intellij, but it won't show any branches until you do a fetch, like so:

git fetch remoteName