{"thread":{"id":"9072","subject":"Seeing differences at origin/branch?","startedAt":"2007-07-17T15:53:03Z","lastAt":"2007-07-17T16:23:27Z","messageCount":3,"participants":["Thomas Adam","Brian Downing","J. Bruce Fields"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"47636","messageId":"18071eea0707170853r41962edfge603ccec7b2e72cb@mail.gmail.com","threadId":"9072","inReplyTo":null,"subject":"Seeing differences at origin/branch?","fromName":"Thomas Adam","fromEmail":"thomas.adam22@gmail.com","sentAt":"2007-07-17T15:53:03Z","receivedAt":"2007-07-17T15:53:03Z","isPatch":false,"sender":{"key":"thomas.adam22@gmail.com","avatar":"https://gravatar.com/avatar/137f9858bc6bfd5b2f743aefd988c81ce0cbd306248889df80e269519cfc8741?d=mp&s=160"},"body":"Hello all,\n\nThis is perhaps going to seem like a very CVS/SVN type of question,\nbut is there a way to see a list of differences between one's local\ncopy and the origin branch?  I'm after something analogous to \"svn\nstatus -u\" really (yes, I know I could get my hands scorched for such\nthings.  :P).  Is this possible?\n\nI've tried:\n\ngit-diff-tree -p origin/master\n\nBut that won't list changes waiting for me that I would get when I\nissue a \"git pull\".\n\nMany thanks,\n\nThomas Adam\n"},{"id":"47639","messageId":"20070717161216.GP19073@lavos.net","threadId":"9072","inReplyTo":"18071eea0707170853r41962edfge603ccec7b2e72cb@mail.gmail.com","subject":"Re: Seeing differences at origin/branch?","fromName":"Brian Downing","fromEmail":"bdowning@lavos.net","sentAt":"2007-07-17T16:12:16Z","receivedAt":"2007-07-17T16:12:16Z","isPatch":false,"sender":{"key":"bdowning@lavos.net","avatar":"https://avatars.githubusercontent.com/u/366426?v=4"},"body":"On Tue, Jul 17, 2007 at 04:53:03PM +0100, Thomas Adam wrote:\n> This is perhaps going to seem like a very CVS/SVN type of question,\n> but is there a way to see a list of differences between one's local\n> copy and the origin branch?  I'm after something analogous to \"svn\n> status -u\" really (yes, I know I could get my hands scorched for such\n> things.  :P).  Is this possible?\n> \n> I've tried:\n> \n> git-diff-tree -p origin/master\n> \n> But that won't list changes waiting for me that I would get when I\n> issue a \"git pull\".\n\nUse \"git fetch\" to fetch the remote changes, but not merge them into\nyour local tracked branches.  \"git pull\" basically just does \"git fetch\"\nthen \"git merge\" into your current branch if it is tracking a remote\nbranch.\n\nYou might as well use \"git diff\" as well, as \"git-diff-tree\" is\ndefinitely plumbing.\n\n% git fetch origin\n...\n% git diff origin/master\n\n-bcd\n"},{"id":"47643","messageId":"20070717162327.GC19102@fieldses.org","threadId":"9072","inReplyTo":"18071eea0707170853r41962edfge603ccec7b2e72cb@mail.gmail.com","subject":"Re: Seeing differences at origin/branch?","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2007-07-17T16:23:27Z","receivedAt":"2007-07-17T16:23:27Z","isPatch":false,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Tue, Jul 17, 2007 at 04:53:03PM +0100, Thomas Adam wrote:\n> This is perhaps going to seem like a very CVS/SVN type of question,\n> but is there a way to see a list of differences between one's local\n> copy and the origin branch?  I'm after something analogous to \"svn\n> status -u\" really (yes, I know I could get my hands scorched for such\n> things.  :P).  Is this possible?\n>\n> I've tried:\n>\n> git-diff-tree -p origin/master\n>\n> But that won't list changes waiting for me that I would get when I\n> issue a \"git pull\".\n\nAfter first doing a \"git fetch\", to update your local view of those\nremote branches:\n\nCommits on your current branch, not in origin:\n\n\tgit diff origin..HEAD\n\nCommits in the origin branch, not in your current branch (so this is\nwhat you'd probably get if you pulled):\n\n\tgit diff HEAD..origin\n\nCommits in either one, not in the other (the union of the above two):\n\n\tgit diff HEAD...origin\n\nThe \"HEAD\" is actually optional in all the above.\n\nAnd, finally, I think\n\n\tgitk HEAD...origin\n\ngives the clearest picture of what's actually going on.\n\n--b.\n"}]}