简体   繁体   English

EGit Eclipse:git commit将文件夹从var / www移动到git存储库

[英]EGit Eclipse: git commit moves the folder from var/www to git repository

There was no problem while I was developing in Java EE Platform, and commiting. 在Java EE平台中进行开发并提交时没有问题。 But in PHP my project folder needs to be in var/www else the server won't run the project. 但是在PHP中,我的项目文件夹必须位于var / www中,否则服务器将无法运行该项目。 But whenever I commit my project, all the source code are moved to the git repository & eclipse also start editing those codes in repository. 但是,每当我提交项目时,所有源代码都会移至git存储库中,并且eclipse也会开始在存储库中编辑这些代码。

Now I need to copy/paste the entire project to var/www from the repos, in order to execute and check my code. 现在,我需要将整个项目从存储库复制/粘贴到var / www,以便执行并检查我的代码。

The solution was simple & easy. 解决方案很简单。

Just "Check the option" : Use or create repository in parent folder of project 只需“检查选项”:在项目的父文件夹中使用或创建存储库

And the rest of thing is done. 剩下的事情就完成了。 BUT, I still don't understand one thing, why couldn't I change the working directory of the git repository. 但是,我仍然不了解一件事,为什么我不能更改git存储库的工作目录。 It's set default to the repository folder. 默认设置为存储库文件夹。 Hope I get some answer from this. 希望我能从中得到一些答案。 Thank You! 谢谢!

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

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