git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Seeing differences at origin/branch?

From
JFJ. Bruce Fields <bfields@fieldses.org>
Date
Jul 17, 2007, 16:23 UTC
Message-ID
<20070717162327.GC19102@fieldses.org>
In-Reply-To
<18071eea0707170853r41962edfge603ccec7b2e72cb@mail.gmail.com>
On Tue, Jul 17, 2007 at 04:53:03PM +0100, Thomas Adam wrote:
Show 12 quoted lines
> 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.
Previous: Brian Downing
Message 3 of 3 in “Seeing differences at origin/branch?”
  1. Thomas AdamJul 17, 2007
  2. Brian DowningJul 17, 2007
  3. J. Bruce FieldsJul 17, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.