通过intelliJ添加远程git仓库 [英] Adding a remote git repo through intelliJ

查看:903
本文介绍了通过intelliJ添加远程git仓库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何通过intelliJ添加远程git仓库,而不是通过git bash。现在,从我在这篇提供将远程存储库添加到本地git存储库的功能


对于Git的新手来说,解决方法是使用命令行并添加一个远程控件,如下所示:

  git remote add remoteName remoteUrl 

之后,远程将显示在Intellij的pull对话框中,但它不会显示任何分支,直到你做一个抓取,如下所示:

  git fetch remoteName 

code>


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?

解决方案

UPDATE: this feature is available since 2016.3 version.

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


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

这篇关于通过intelliJ添加远程git仓库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆