简体   繁体   English

将本地(现有)git仓库导入Aptana 3

[英]Import a local (existing) git repo into Aptana 3

I had installed Git, edited files with Notepad++ and used GitBash to commit my changes in some local repositories. 我安装了Git,使用Notepad ++编辑了文件,并使用Gi​​tBash在一些本地存储库中提交我的更改。 Some of them are published to GitHub, some were cloned from project sites. 其中一些发布到GitHub,一些是从项目站点克隆的。 But now, Notepad++ is not satisfying any more. 但是现在,Notepad ++已经不再令人满意了。

So, I'm trying to get Aptana to work. 所以,我想让Aptana工作。 Of course, I want to use the existing git repositories as projects-to-be. 当然,我想将现有的git存储库用作未来的项目。 But how do I do that? 但是我该怎么做? The git import wizard (File->Import->Git Repository as new Project) seems to clone the repo into a new project folder, which I don't want. git导入向导(File-> Import-> Git Repository as new Project)似乎将repo克隆到一个我不想要的新项目文件夹中。

You just need to create a new project within Aptana Studio, using the existing project folder. 您只需使用现有项目文件夹在Aptana Studio中创建一个新项目。 Let say you have a project that resides in project_folder . 假设您有一个驻留在project_folder的项目。

  1. If you are not sure about anything, backup your project first. 如果您不确定,请先备份您的项目。
  2. Go to File -> New -> Choose the type of project you wan t 转到File -> New -> Choose the type of project you wan
  3. On the pop up windows asking about the detail, point the Location to the exisiting project, in this case /some_path/project_folder 在弹出窗口询问详细信息,将Location指向现有项目,在本例中为/some_path/project_folder
  4. Create a new project will generates a .project file in your project folder, so you might want to put that into .gitignore so that it won't get pushed to the central repo. 创建一个新项目将在项目文件夹中生成一个.project文件,因此您可能希望将其放入.gitignore以便它不会被推送到中央存储库。

I was stuck with this for a minute, but I found a simple solution without needing additional plugins, etc. 我被困了一分钟,但我找到了一个简单的解决方案,无需额外的插件等。

On Windows (and possibly other OSs): If you're importing a repo that's hosted locally or on a mapped drive, try File -> Import -> Git -> Git Repository as New Project . 在Windows(以及可能的其他操作系统)上:如果要导入本地或映射驱动器上的File -> Import -> Git -> Git Repository as New Project ,请尝试将File -> Import -> Git -> Git Repository as New Project Click Next and insert the absolute file path for the URI . 单击“ Next然后插入URI的绝对文件路径。 An example would be file:///O:/projects/sharedproject.git . 一个例子是file:///O:/projects/sharedproject.git

This should clone the repo into your workspace with Git already initialized. 这应该将repo克隆到你的工作区,Git已经初始化了。


I realized after posting this that I posted to the wrong question, but maybe someone will find this useful anyway. 在发布这个帖子之后我意识到我发布了错误的问题,但也许有人会觉得这很有用。 Hope this helps. 希望这可以帮助。

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

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