Using Eclipse EGit Plugin to Push Changes to Remote

Introduction

This guide was intended towards my ILP group working on adding features to an old java game made previously.

Assumptions

This guide assumes you have already cloned and made changes to indexed files in the project.

I am also assuming that there is only one branch, namely the master branch.

Step 1

Right Click on your project in the package explorer > Team > Commit…

Step 1

Step 2

Add the files you would like to apply to the remote repository to the staged changes section, shown below.

Right Click on the File > Add to Index

egit-2

Step 3

Enter a commit message.

Enter your author (if necessary).

Click “Commit”

egit-3

Step 4

At this point, if you have other members working on the same branch, you will want to retrieve updates that happened between the time you started making changes in the project and the time you committed those changes.

egit-4

Step 5

You may or may not have to deal with conflicts from other commits. I have not come across this situation yet so I can’t show an example here at this time.

Step 6

After handling conflicts. You want to push your changes to the remote Git repository.

Right Cick on Project > Team > Remote > Push…

NOTE: This is NOT the same as Team > Push Branch ‘master’ or Push to Upstream

egit-5