Closed sbrinkmeyer closed 8 years ago
By design, Git prefers to work offline as much as possible. diff
is, basically, always going to be comparing two things on disk. What you might be trying to get at, is how to "peek" at what's coming from GitHub before pull
merges those changes in?
In that case, you might want to look at git fetch
. fetch
is approximately half of a pull
-- it updates the remote refs (eg, origin/master
is updated to match what's on GitHub) but leaves local branches as is (so master
is not advanced to match origin/master
) -- you can think of pull
as being fetch + merge
.
Once you've done a fetch
, you can use diff
with eg, origin/<branch>
to compare your local branch with whatever is on origin
-- as of the last fetch
. Just keep in mind that there's always some lag -- due to Git's "offline everywhere" design.
@jaw6 (just getting your attention) :smile: