Since your computer’s username and domain are not always associate with your GitHub settings, you may experience unrecognized committer problem while working with a team. It’s not a critical problem in most cases, but annoying. Here is how you can customize your name in an Eclipse environment with GitHub.
-Duser.name=Firstname Lastname at the bottom of
eclipse.ini file, which can be found in the Eclipse directory.
Default Author & Committer
Go to Eclipse menu -> Preferences -> Team -> Git -> Configuration. Open configuration and add:
name = Firstname Lastname
email = Your email address
Or, you can add entries:
user.name = Firstname Lastname
user.email = Your email address
If your email address matches the email address you registered on GitHub, it can be recognized.
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:
- Create a repo on github
- Install EGit in eclipse
- Import the repo on github into eclipse with a Local Destination
- Eclipse will download files in this repo, but it’s just a normal folder, not a project
- Create new local module with eclipse (so the project can be configured by eclipse)
- In the file system, copy local module to the repo folder
- Refresh the repo folder in eclipse, and do a commit
- Delete the local project (the original one) in eclipse
- Import the local repo, and now you should be able to choose the project built earlier as an existing Eclipse project