简体   繁体   English

Eclipse Egit使用远程系统添加带git支持的项目

[英]Eclipse Egit using remote system to add project with git support

I have a Server with SSH access. 我有一个SSH访问服务器。 On this server I have a php/yii project including a git repository (so versioned with git). 在这个服务器上,我有一个php / yii项目,包括一个git存储库(所以用git版本)。 Is it possible to use the EGit Team Provider (which just works fine for local projects/ .git folders) for those remote projects? 对于那些远程项目,是否可以使用EGit Team Provider(适用于本地项目/ .git文件夹)?

I just get nullpoint exceptions with the wizard (Share project) and cant get EGit to recognize the existing git project. 我只是通过向导获得nullpoint异常(共享项目),并且无法让EGit识别现有的git项目。

Maybe could try this by creating a fresh test .git repo on a linux server, add a php file, use eclipse remote system to browse by ssh for the folder containing the .git folder, use right click on that folder->create remote project and then somehow figure out how EGit could be added... 也许可以通过在linux服务器上创建一个新的测试.git repo来尝试这个,添加一个php文件,使用eclipse远程系统通过ssh浏览包含.git文件夹的文件夹,使用右键单击该文件夹 - >创建远程项目然后以某种方式弄清楚如何添加EGit ......

EGIT doesn't recognize the repository if it doesn't end with .git extension 如果它不以.git扩展名结尾,则EGIT无法识别该存储库

Login to the LINUX server 登录LINUX服务器

cd to path in which you want the repository in cd到您希望存储库所在的路径

mkdir your_project_name.git //This will create the repository mkdir your_project_name.git //这将创建存储库

git init --bare //This will actually initialize the git repository git init --bare //这实际上会初始化git存储库

clone this repository 克隆这个存储库

add files in the local repo 在本地仓库中添加文件

add files to index, commit and push to master 将文件添加到索引,提交并推送到主服务器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM