简体   繁体   English

IDEA IntelliJ git 克隆

[英]IDEA IntelliJ git clone

I am new to git and IntelliJ.我是 git 和 IntelliJ 的新手。 I would like to get the source code for a project from a remote git repository and work on it using IntelliJ.我想从远程 git 存储库中获取项目的源代码,并使用 IntelliJ 进行处理。 I am use to Eclipse and SVN which has a "Checkout as Project" dialog.我习惯于 Eclipse 和 SVN 有一个“作为项目结帐”对话框。

I tried using "Check out from version control" but w/o any success.我尝试使用“从版本控制中签出”但没有任何成功。

  • As the "GIT Repo URL" I entered git+ssh://user@devserver.dev.org:/var/git/myProject作为“GIT Repo URL”,我输入了git+ssh://user@devserver.dev.org:/var/git/myProject
  • As the "Parent Dir" I added local directory /home/myName作为“父目录”,我添加了本地目录/home/myName
  • As the "Dir Name" I added myProject作为“目录名称”,我添加了myProject

I pressed the clone button and nothing happend on the IDE.我按下了克隆按钮,IDE 上没有任何反应。 It does create the directory /home/myName/myProject with the .git configs but nothing has been fetched from the remote repository nor has the "New Project" Wizzard come up.它确实使用.git配置创建目录/home/myName/myProject ,但没有从远程存储库中获取任何内容,也没有出现“新项目”向导。

Can someone shed some light on how this would be done using IntelliJ and Git compared to Eclipse and SVN?与 Z32F7222026696F307878889194DEE83E5Z 和 SVN 相比,有人可以阐明如何使用 IntelliJ 和 Git 完成此操作吗? I am using IDEA 10.5 and Fedora LINUX OS.我正在使用 IDEA 10.5 和 Fedora LINUX 操作系统。

With IntellIJ 12.0.3 VCS/Check out from Version Control/Git使用 IntellIJ 12.0.3 VCS/从版本控制/Git 签出

在 Mac 上从 Git 签出

With intelliJ , there is always going to be something that could do with improvement.使用intelliJ ,总会有一些可以改进的地方。 In this particular instance, you will have a fetching progress indicator at the bottom of your window.在这个特定的例子中,您将在 window 的底部有一个获取进度指示器。

If you create a blank project (with no modules) first, then use the Version Control -> Checkout from version control -> Git , you will have a "version control" tab at the bottom of your window where you can at least see the commands sent to git.如果您首先创建一个空白项目(没有模块),然后使用Version Control -> Checkout from version control -> Git ,您将在 window 底部有一个“版本控制”选项卡,您至少可以在其中看到命令发送到 git。 There is still no progress shown, and if you are lucky like me, it'll sit there silently for ages while git drip feeds the repo with 40kb/s (and we're on a 100 MB connection).仍然没有显示任何进展,如果你像我一样幸运,它会静静地坐在那里很长时间,而 git 以 40kb/s 的速度为 repo 提供数据(我们的连接速度为 100 MB)。

Eventually, it'll allow you to then create a new project for this repo and the tags/branches in your repo will spew out in the version control info panel (that other tab).最终,它将允许您为此 repo 创建一个新项目,并且 repo 中的标签/分支将在版本控制信息面板(另一个选项卡)中显示出来。 It works, but its too damn quiet.它可以工作,但它太安静了。

I use IntelliJ IDEA 2019.3 and this works to clone, import and (optionally) open the project in intelliJ:我使用 IntelliJ IDEA 2019.3,它可以在 intelliJ 中克隆、导入和(可选)打开项目:

File --> New --> Project From Version Control...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM