Using Egit to Create a Repository

In this web page, the steps are given to create a Git repository with the following properties:

This web page assumes that the repo will be stored locally on a Linux system, that the user's local user name is localname, the user's github name is githubname, the name of the repo is reponame both locally and on github, and the name of the Eclipse project is projectname.

Create a Local Repository

This will create a local repo on your machine.

Add an Eclipse Project to the Repository

Follow these steps to add any number of Eclipse projects to the repo. The key is to locate the project in your Git repo directory.

Add a .gitignore file

You should include a .gitignore file in your project so that files that are created from your source files are not tracked. This includes files created by the compiler (.class files) and javadoc (.html files).

Create the Remote Repository

If you want to create a remote repository on, then you need to follow this step and the following step. You should realize that that the default setup is to create a public repository. If this is inappropriate, you will need to find/set up a different Git server (or pay for a private account).

Setup the Local Repository to Push to and Pull from the Remote

If you want to use a remote repository with your local repository, then several properties of the local repository need to be defined to enable push and pull operations. [These are automatically defined when you clone a repository.]

The First Commit

At this point, you should be able to do your first commit and push (or just a commit if there is no remote repository).