简体   繁体   English

Eclipse无法识别基于git的项目

[英]Eclipse doesn't recognise git-based project

I've cloned a git cmake project to a directory sourcedir . 我已经将git cmake项目克隆到目录sourcedir I created a .project file with 我创建了一个.project文件

cd build 
cmake -G"Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug sourcedir

I then imported the project in eclipse, which works fine. 然后,我将项目导入eclipse中,效果很好。 The source files are in a folder in the project explorer called [Source directory] . 源文件位于项目浏览器中名为[Source directory]的文件夹中。 But how can I get Eclipse to recognise the project as a git-based project? 但是,如何使Eclipse将项目识别为基于git的项目?

I can see my repository with Window -> show view -> Other -> Git -> Git Repositories , but it doesn't seem to be linked to the files in [Source directory] . 我可以通过Window -> show view -> Other -> Git -> Git Repositories看到我的存储Window -> show view -> Other -> Git -> Git Repositories ,但是它似乎没有链接到[Source directory]的文件。

If you go to File > import can you select git > projects from git ? 如果转到File > import可以git > projects from git选择git > projects from git吗? This will automatically link the project to the git repo. 这将自动将项目链接到git repo。

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

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