问题
I can't seem to figure this out. I keep importing, but I get no files from the repo.
I have a local repo that has a grails project that I checked in. Now, I want to get those files out into a new project in eclipse. (Using EGit).
I've tried several different ways, but all I ever get is an empty grails project. I can see the source tree with all the sources in it in the git repo browser.
Help?
回答1:
I usually do this:
- Import existing projects into Eclipse (could be you have to do some Import existing Grails project, depending on the plugin), and select the project directory (which also happens to be a Git repository)
After your project is imported, Eclipse is still not aware of the Git repository.
To fix this:
- Right-click the project
- Select Team -> Share
- Select Git in the next dialog
- Click Next a time or two, and you're done.
来源:https://stackoverflow.com/questions/11418905/eclipse-egit-import-from-local-git-repo