将一个 Github 存储库连接到多个 Aptana 项目 [英] Connecting one Github repository to several Aptana projects

查看:23
本文介绍了将一个 Github 存储库连接到多个 Aptana 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法将一个 Github 存储库连接到 Aptana 中的多个不同项目?换句话说,在连接到不同 Aptana 项目的单个 Github 存储库中拥有不同的目录?

我需要这种能力,因为我是一名从事许多项目的自由职业者,而且我不想向 Github 支付大量的美元.这在过去可以通过 SVN 实现.

解决方案

GitHub 存储库本身不连接任何东西,它只包含一组文件.
如果在这些文件中,您有多个 Aptana 项目,您可以在本地克隆后使用这些项目.

但是,如果您只想克隆 GitHub 存储库的部分以便仅获得其中一个项目,这是不可能的(不支持按文件路径进行部分克隆)

如果您只需要一个 GitHub 存储库,请将不同的 Aptana 项目存储在单独的分支中.
然后,您可以多次克隆同一个存储库,并根据您的项目签出不同的分支.
从git1.7.10+开始,你甚至可以git clone 只是从你的仓库中一个分支!

git clone --single-branch

<块引用>

仅克隆通向单个分支尖端的历史记录,由 --branch 选项指定或主分支远程的 HEAD 指向.
使用 --depth 选项创建浅层克隆时,这是默认设置,除非给出 --no-single-branch 以获取所有提示附近的历史分支.

但这可能有与浅克隆相关的限制,即:

<块引用>

浅层存储库有很多限制(你不能从它克隆或获取,也不能从它推入或推入),但如果你只对一个历史悠久的大型项目的近期历史感兴趣,那就足够了,并且想以补丁的形式发送修复.

Is there a way to connect one Github repository to several different projects in Aptana? In other words, to have different directories in a single Github repository connected to different Aptana projects?

I need this ability since I'm a freelancer who works on many projects, and I don't wish to pay loads of $$$ to Github. This used to be possible with SVN.

解决方案

A GitHub repo in itself isn't connected to anything, it only contains a set of files.
If, amongst those files, you have several Aptana projects, you can use those once you have clone locally.

However, if you want to clone only a part of the GitHub repo in order to get only one of those projects, this isn't possible (partial clones by filepath aren't supported)

If you want only one GitHub repo, then store your different Aptana project in separate branches.
You can then clone multiple times the same repo, and checkout a different branch depending on your project.
Since git1.7.10+, you can even git clone just one branch out of your repo!

git clone --single-branch

Clone only the history leading to the tip of a single branch, either specified by the --branch option or the primary branch remote's HEAD points at.
When creating a shallow clone with the --depth option, this is the default, unless --no-single-branch is given to fetch the histories near the tips of all branches.

But that may have limitations associated with shallow clone, ie:

A shallow repository has a number of limitations (you cannot clone or fetch from it, nor push from nor into it), but is adequate if you are only interested in the recent history of a large project with a long history, and would want to send in fixes as patches.

这篇关于将一个 Github 存储库连接到多个 Aptana 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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