17

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?

EducateMe
  • 461
  • 1
  • 3
  • 13

1 Answers1

25

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
janos
  • 120,954
  • 29
  • 226
  • 236