EGit - Project subfolder in repository

心不动则不痛 提交于 2019-12-07 20:09:35

问题


I have the following problem with EGit 3.4.2.201412180340-r in Eclipse Luna Service Release 1a (4.4.1), using GitHub (which should be mostly irrelevant):

I have a example java project set up that is configured with EGit and is connected to a GitHub Repository. I commited a few example changes to master and pushed them as well.

The problem is: My repositories always have a weird kind of file layout:
Repository Root >MyProjectName> src > cf > randers > myproject > main > Main.java

The most projects I know on GitHub have the following layout:
Repository Root > src > cf > randers > myproject > main > Main.java

Can I fix that?


回答1:


You could clone your GitHub repo (in command-line, outside Eclipse), and:

  • git mv everything under MyProjectName in the root folder of that repo
  • git add, git commit and git push that move.
  • import that .eclipse (now move under the root of the local git repo) in a new Eclipse workspace.


来源:https://stackoverflow.com/questions/28657356/egit-project-subfolder-in-repository

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!