git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Seeing differences at origin/branch?
@ 2007-07-17 15:53 Thomas Adam
  2007-07-17 16:12 ` Brian Downing
  2007-07-17 16:23 ` J. Bruce Fields
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Adam @ 2007-07-17 15:53 UTC (permalink / raw)
  To: git

Hello all,

This is perhaps going to seem like a very CVS/SVN type of question,
but is there a way to see a list of differences between one's local
copy and the origin branch?  I'm after something analogous to "svn
status -u" really (yes, I know I could get my hands scorched for such
things.  :P).  Is this possible?

I've tried:

git-diff-tree -p origin/master

But that won't list changes waiting for me that I would get when I
issue a "git pull".

Many thanks,

Thomas Adam

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Seeing differences at origin/branch?
  2007-07-17 15:53 Seeing differences at origin/branch? Thomas Adam
@ 2007-07-17 16:12 ` Brian Downing
  2007-07-17 16:23 ` J. Bruce Fields
  1 sibling, 0 replies; 3+ messages in thread
From: Brian Downing @ 2007-07-17 16:12 UTC (permalink / raw)
  To: Thomas Adam; +Cc: git

On Tue, Jul 17, 2007 at 04:53:03PM +0100, Thomas Adam wrote:
> This is perhaps going to seem like a very CVS/SVN type of question,
> but is there a way to see a list of differences between one's local
> copy and the origin branch?  I'm after something analogous to "svn
> status -u" really (yes, I know I could get my hands scorched for such
> things.  :P).  Is this possible?
> 
> I've tried:
> 
> git-diff-tree -p origin/master
> 
> But that won't list changes waiting for me that I would get when I
> issue a "git pull".

Use "git fetch" to fetch the remote changes, but not merge them into
your local tracked branches.  "git pull" basically just does "git fetch"
then "git merge" into your current branch if it is tracking a remote
branch.

You might as well use "git diff" as well, as "git-diff-tree" is
definitely plumbing.

% git fetch origin
...
% git diff origin/master

-bcd

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Seeing differences at origin/branch?
  2007-07-17 15:53 Seeing differences at origin/branch? Thomas Adam
  2007-07-17 16:12 ` Brian Downing
@ 2007-07-17 16:23 ` J. Bruce Fields
  1 sibling, 0 replies; 3+ messages in thread
From: J. Bruce Fields @ 2007-07-17 16:23 UTC (permalink / raw)
  To: Thomas Adam; +Cc: git

On Tue, Jul 17, 2007 at 04:53:03PM +0100, Thomas Adam wrote:
> This is perhaps going to seem like a very CVS/SVN type of question,
> but is there a way to see a list of differences between one's local
> copy and the origin branch?  I'm after something analogous to "svn
> status -u" really (yes, I know I could get my hands scorched for such
> things.  :P).  Is this possible?
>
> I've tried:
>
> git-diff-tree -p origin/master
>
> But that won't list changes waiting for me that I would get when I
> issue a "git pull".

After first doing a "git fetch", to update your local view of those
remote branches:

Commits on your current branch, not in origin:

	git diff origin..HEAD

Commits in the origin branch, not in your current branch (so this is
what you'd probably get if you pulled):

	git diff HEAD..origin

Commits in either one, not in the other (the union of the above two):

	git diff HEAD...origin

The "HEAD" is actually optional in all the above.

And, finally, I think

	gitk HEAD...origin

gives the clearest picture of what's actually going on.

--b.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-07-17 16:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-17 15:53 Seeing differences at origin/branch? Thomas Adam
2007-07-17 16:12 ` Brian Downing
2007-07-17 16:23 ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).