Import modules within a github repository

Instead of creating bunch of repositories for different modules of one project on github, you can make one repository for the entire project (which makes more sense), and import each module separately in your eclipse.
Note: unlike IntelliJ, in eclipse terminology, module is called project. I’m going to switch back to eclipse terminology in the following part.

You need 9 steps to do it:

  1. Create a repo on github
  2. Install EGit in eclipse
  3. Import the repo on github into eclipse with a Local Destination
  4. Eclipse will download files in this repo, but it’s just a normal folder, not a project
  5. Create new local module with eclipse (so the project can be configured by eclipse)
  6. In the file system, copy local module to the repo folder
  7. Refresh the repo folder in eclipse, and do a commit
  8. Delete the local project (the original one) in eclipse
  9. Import the local repo, and now you should be able to choose the project built earlier as an existing Eclipse project
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s