Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I compare repos from different projects through github? [duplicate]

Git novice here, how do I compare two completely separate repos (no forks / branches between them) using github? If this is not possible, how do I compare the two repos?

like image 397
EducateMe Avatar asked Jul 16 '14 17:07

EducateMe


1 Answers

On GitHub it's not possible to compare two unrelated repos.

On your computer you can:

  1. Go to the working directory of your local repo
  2. Add a remote for the other repo and fetch it
  3. Compare using git diff

For example:

cd /path/to/repo
git remote add other URL_TO_OTHER
git fetch other
git diff other/branchname
git diff ..other/branchname  # diff in the other direction
like image 53
janos Avatar answered Oct 20 '22 20:10

janos