简体   繁体   English

在aptana 3中克隆rails git repo

[英]cloning rails git repo in aptana 3

I am trying to clone my rails git repo into aptana so I can work on it and also change between branches flawlessly. 我试图将我的rails git repo克隆到aptana中,这样我就可以工作并在分支之间完美切换。 I have been using netbeans for the last few years, but now I would like to use aptana because it is more up to date. 最近几年我一直在使用netbeans,但是现在我想使用aptana,因为它是最新的。

I can not find a way to clone git repo in aptana and have all the branches available. 我找不到在aptana中克隆git repo并使所有分支可用的方法。

Would anyone help me please? 有人可以帮我吗?

Thanks 谢谢

It looks like Aptana just performs a simple git clone operation, which means that all of your branches are available. 看来Aptana只是执行一个简单的git clone操作,这意味着您所有的分支可用。 It's just that Aptana only shows you "local" branches (that is, branches that exist in the checked-out working copy on which Aptana is operating). 只是Aptana仅向您显示“本地”分支(即,运行Aptana的已签出工作副本中存在的分支)。 It doesn't appear, at least at first glance, that the GUI allows you to select remote branches...but you can do this without a problem on the command line. 至少乍一看,GUI并没有允许您选择远程分支……但是您可以在命令行上毫无问题地做到这一点。

Assujing that your Aptana project is in ~/Documents/Aptana Studio 3 WOrkspace/MyProject , you can do something like this... 确认您的Aptana项目在~/Documents/Aptana Studio 3 WOrkspace/MyProject ,您可以执行以下操作...

  • Change to the project directory. 转到项目目录。

     $ cd "~/Document/Aptana Studio 3 Workspace/MyProject" 
  • Run git branch -a to see all available branches. 运行git branch -a查看所有可用分支。 You'll see something like this: 您会看到以下内容:

     $ git branch -a * master remotes/origin/develop remotes/origin/master remotes/origin/nifty.feature 
  • Everything starting with remotes/ is a remote branch. remotes/开头的所有内容都是一个远程分支。 You can create a local branch that tracks the remote branch with the git checkout command. 您可以使用git checkout命令创建一个跟踪远程分支的本地分支。 For example, to check out the develop branch: 例如,检出develop分支:

     $ git checkout develop Branch develop set up to track remote branch develop from origin. Switched to a new branch 'develop' 

Return to Aptana Studio and you'll see the new branch listed in the popup menu by your project name. 返回Aptana Studio,您将在项目名称的弹出菜单中看到新分支。

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

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