[AMBER-Developers] more on how git works

From: David A Case <case.biomaps.rutgers.edu>
Date: Fri, 20 Apr 2012 15:33:19 -0400

I'm reproducing a recent email from Jason about possibly surprising behavior
with "git diff --stat origin/master" type commands:

When you do a "git diff --stat origin/master", what it's doing is
taking a diff of the state of origin/master stored on _your local
repository_ and comparing it to the state of master on _your local
repository_. Never does it actually go to the server to check. Each git
repository actually stores the full state of each branch on every remote
that it has aliased (because it is truly distributed). As a result, if you
run "git diff --stat origin/master" *without* doing a fetch (or pull)
first, then your git repository doesn't know that the remote has changed.

Therefore, the only way a git diff --stat would work is if you had done a
git fetch first.


AMBER-Developers mailing list
Received on Fri Apr 20 2012 - 13:00:02 PDT
Custom Search