I have local git repo, which i'd like to add to my projects as a GIT PHP Project
.
My workspace is at C:\www
and repo is at C:\www\citest
which is a existing git repo.
Now when i try to create project from git like so
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. 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. It worked, but it didn't have git functionality.
How can i create git project from existing git local repo so it the folder ends up in my workspace C:\www
?
I would rather keep the git repo well separated from the http workspace in term of eclipse project.
You can manage your git repo as a php project, and add a clone of that repo in your c:\www
workspace.
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).
See for instance "Simple git post-commit hook to copy committed files to a certain folder".