1) Add any remote repositories you want to compare:
git remote add foobar git://github.com/user/foobar.git
2) Update your local copy of a remote:
git fetch foobar
Fetch won't change your working copy.
3) Compare any branch from your local repository to any remote you've added:
git diff master foobar/master
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…