Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » How do I compare two different repository?
How do I compare two different repository? [message #1718001] Fri, 18 December 2015 13:45 Go to next message
Vishal Kashyap is currently offline Vishal KashyapFriend
Messages: 1
Registered: December 2015
Junior Member
I want to compare between two different repository or working tree, Is there a way?
Re: How do I compare two different repository? [message #1718699 is a reply to message #1718001] Tue, 29 December 2015 10:48 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
Most commands in Git are local, there is no remote compare.
Clone the first repository and fetch the other repository into the same clone then you should be able to compare using Git.

git clone url1 repo1
cd repo1
git remote add repo2 url2
git fetch repo2

compare master branch of repo1 and repo2:
git diff origin/master..repo2/master
Re: How do I compare two different repository? [message #1718700 is a reply to message #1718001] Tue, 29 December 2015 10:48 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
Most commands in Git are local, there is no remote compare.
Clone the first repository and fetch the other repository into the same clone then you should be able to compare using Git.

git clone url1 repo1
cd repo1
git remote add repo2 url2
git fetch repo2

compare master branch of repo1 and repo2:
git diff origin/master..repo2/master
Previous Topic:Referencing multiple repository sources
Next Topic:CheckoutConflictException during Pull
Goto Forum:
  


Current Time: Thu Apr 25 13:19:04 GMT 2024

Powered by FUDForum. Page generated in 0.02745 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top