问题
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 mveverything underMyProjectNamein the root folder of that repogit add,git commitandgit pushthat 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