Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
781 views
in Technique[技术] by (71.8m points)

git - Connecting one Github repository to several Aptana projects

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...