GIT:How to tell if two repositories are equivalent

Your local project started as a complete clone(kind of like copy) of the server repository.  As time progresses the server repository changes, you make local changes and lose track of who has done what and you would like to see what is different.  You can use EGit to  display views and dialogs of the differences. There are many ways to see what the differences are between your local repository and another repository, typically the server repository.

  1. Simple easy approach using Compare ( doesn’t allow you to resolve the differences)
  2. Advanced using Synchronize (Allows you to resolve the issues)

Compare Approach

Click on the Project and then click on Compare.

Screen Shot 2013-09-21 at 2.19.38 PM

Look for a tab with “Git Tree Compare” as the label and see if there are any differences.

Screen Shot 2013-09-21 at 2.20.18 PM

If you have differences and need to resolve them contact the list for more advanced steps.

Synchronize Approach

Navigate to the project you want to compare to the server version. Right click on the project in the Navigator or Project View. Go to Team then click Synchronize.


A dialog box will be shown with the differences. If you don’t see this, then the repositories are not equivalent. To exit the following two dialogs, click OK on the first one and Yes on the second one.

If the repositories are different you can look at each difference and decide to accept it or reject it. If the repositories were different, you would not see the first dialog below which says “No changes found”.  You would see the dialog immediately following the dialog below Synchronize to resolve differences is an advanced topic we will cover it in class. .

Syncrhonize Start

Click OK and you will see the Synchronize View. Accept Synchronize

Synchronize is an advanced topic. I would recommend that you don’t actually take any actions other than clicking on the files on the file tree to see what the differences are. Please see how to Restore my Repository to the server copy.

Screen Shot 2013-09-21 at 2.21.20 PM

To exit Synchronize click the Red x next to the Tab Labeled Synchronize.

To get back to the default view click on Java in the upper right hand corner.Screen Shot 2013-09-21 at 2.21.41 PM


Leave a Reply

Your email address will not be published. Required fields are marked *