Source Code Version Control for Android with Eclipse and EGit (II)

In the previous post we explained how to install and configure EGit and how to clone an existing project to our local repository. In this post, I’m going to explain how to add a new project to our local Git repository and then upload it to the remote repository in our Git server host.

Ok, first of all you have to import an existing Eclipse project or create a new one. Then right button on project and select Team/Share project.  In the next window select Git and then click on Create new repository or select an existing one and then click Finish.

You’ll see that the icons of the files has been decorated. Right click on the project and press Team/Add. With this we have added the files to the Git Index.

Now right click in the Bin folder of our project and press Team/Ignore. Doing this we avoid to commit the binary files of the project.

The next step is right click again on the project and Team/Commit, writing a nice comment.

Copy the URL of your remote repository, it’s something like this: “git@git.assembla.com:YOUR_PROJECT_NAME.git”, in this case our host provider is Assembla, but you can choose whatever you want.

Finally, right click and Team/Remote/Push. Eclipse fill up all the fields. Then just press Next, Next, and Finish.

And that’s it. If everything went well, you will have your project on your remote repository.

As usual, if you have any doubt, don’t hesitate to contact me.

 

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

%d bloggers like this: