[英]Adding existing local git repo - Zend studio
I have local git repo, which i'd like to add to my projects as a GIT PHP Project
. 我有本地git repo,我想将其作为GIT PHP Project
添加到我的项目中。
My workspace is at C:\\www
and repo is at C:\\www\\citest
which is a existing git repo. 我的工作区位于C:\\www
,存储库位于C:\\www\\citest
,它是现有的git存储库。
Now when i try to create project from git like so 现在,当我尝试像这样从git创建项目时
Project Name: citest
Location: C:\www
URI: file:///C:\www\citest
then i get following error: 然后我得到以下错误:
C:\\www\\citest overlaps the location of another project: 'citest'
But C:\\www\\citest
is not zend porject. 但是C:\\www\\citest
不是 zend C:\\www\\citest
。 It is olny a git repo. 这是一个混帐回购。
So far i've tried File > Import, with no results. 到目前为止,我已经尝试了“文件”>“导入”,但没有结果。
Then i tried to put citest/
folder outside from my workspace, initialized new git project, deleted project from zend, copied citest/
folder back to www/
and tried to import existing project. 然后,我尝试将citest/
文件夹从工作区中放到外面,初始化新的git项目,从zend删除项目,将citest/
文件夹复制回www/
然后尝试导入现有项目。 It worked, but it didn't have git functionality. 它有效,但是没有git功能。
How can i create git project from existing git local repo so it the folder ends up in my workspace C:\\www
? 我如何从现有的git本地仓库创建git项目 ,以便该文件夹最终出现在我的工作空间C:\\www
?
I would rather keep the git repo well separated from the http workspace in term of eclipse project. 我宁愿在eclipse项目方面将git repo与http工作区分开。
You can manage your git repo as a php project, and add a clone of that repo in your c:\\www
workspace. 您可以将git repo作为php项目进行管理,并在c:\\www
工作区中添加该repo的副本 。
Then a post-commit
hook (in the git repo managed by Eclipse) can checkout automatically any commit you would do in your Eclipse project (checkout in the git repo in your c:\\www
workspace). 然后post-commit
挂钩(在Eclipse管理的git repo中)可以自动签出您将在Eclipse项目中执行的任何提交(在c:\\www
工作区的git repo中签出)。
See for instance " Simple git post-commit hook to copy committed files to a certain folder ". 例如,参见“ 简单的git post-commit钩子,将已提交的文件复制到某个文件夹 ”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.