Importing a Git repo into Aptana project sub

I'm new to Aptana 3, and I want to clone a Git repository into a project sub-folder. The project is a WordPress installation located at /var/www/wordpress, and the repository is a WordPress theme located at /var/www/wordpress/public_html/wp-content/themes/mytheme. My workspace is /var/www. I'm using Linux.

If I select File > Import > Git > Git Repository as New Project, the resulting project includes the entire WordPress installation starting at /var/www/wordpress, even if I select the theme sub-folder.

I'm OK with this because it makes sense given that my workspace is /var/www, but I can't use Aptana 3 to commit/push/pull, etc. when the repository is imported this way. (None of the Git options show up under Team in the context menu.)

If I import the repository into its own folder, say, /var/www/mytheme, this works, but the obvious problem here is that I can't test the theme while I'm working on it unless I create a symbolic link like so:

ln -s /var/www/mytheme /var/www/wordpress/public_html/wp-content/themes/mytheme

Is there a better way to do this?


I believe this can be helped by referring to an existing question on StackOverflow regarding cloning specific folders, I was looking for something similar with Aptana and found both, hope this helps. This answer was originally provided by Can Berk Güder in response to the below referenced question.

Option A:

git clone git@github.com:whatever folder-name

Option B:

move the .git folder, too.

Better yet:

Keep your working copy somewhere else, and create a symbolic link.

Reference: How do you clone a Git repository into a specific folder?

链接地址: http://www.djcxy.com/p/90504.html

上一篇: 如何克隆私人git并从中创建一个新的git

下一篇: 将Git仓库导入Aptana项目子