{"thread":{"id":"16123","subject":"Git remote status","startedAt":"2008-11-01T19:52:48Z","lastAt":"2008-11-02T03:30:56Z","messageCount":3,"participants":["Gonsolo","Miklos Vajna","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"94581","messageId":"490CB390.9000206@gmail.com","threadId":"16123","inReplyTo":null,"subject":"Git remote status","fromName":"Gonsolo","fromEmail":"gonsolo@gmail.com","sentAt":"2008-11-01T19:52:48Z","receivedAt":"2008-11-01T19:52:48Z","isPatch":false,"sender":{"key":"gonsolo@gmail.com","avatar":null},"body":"Hi!\n\nIf I switch branches with \"git checkout master\" git tells me something \nlike \"Your branch is ahead of the tracked remote branch 'origin/master' \nby 39 commits\".\nIs there a \"git remote status\" or git-status switch to get the same \ninformation without switching branches?\nSometimes it's valuable whether one should push changes (for example \nbefore installing a new Ubuntu version ;) ).\n\nThank you,\n\ng\n"},{"id":"94585","messageId":"20081101201124.GX24201@genesis.frugalware.org","threadId":"16123","inReplyTo":"490CB390.9000206@gmail.com","subject":"Re: Git remote status","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-11-01T20:11:24Z","receivedAt":"2008-11-01T20:11:24Z","isPatch":false,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Sat, Nov 01, 2008 at 08:52:48PM +0100, Gonsolo <gonsolo@gmail.com> wrote:\n> Is there a \"git remote status\" or git-status switch to get the same \n> information without switching branches?\n\nJust 'git checkout' should print the info for the current branch.\n"},{"id":"94617","messageId":"20081102033056.GA4936@coredump.intra.peff.net","threadId":"16123","inReplyTo":"490CB390.9000206@gmail.com","subject":"Re: Git remote status","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-11-02T03:30:56Z","receivedAt":"2008-11-02T03:30:56Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Nov 01, 2008 at 08:52:48PM +0100, Gonsolo wrote:\n\n> If I switch branches with \"git checkout master\" git tells me something  \n> like \"Your branch is ahead of the tracked remote branch 'origin/master'  \n> by 39 commits\".\n> Is there a \"git remote status\" or git-status switch to get the same  \n> information without switching branches?\n\n\"git status\" will do this automatically in recent versions of git (as of\n1.6.0, I believe).\n\nYou can also use \"git branch -v\" to see a summary of how all branches\nrelate to their tracked counterparts.\n\n> Sometimes it's valuable whether one should push changes (for example  \n> before installing a new Ubuntu version ;) ).\n\nFor that, I might want to actually _see_ the changes. So I would use:\n\n  git shortlog origin/master..\n\n(or \"log\" with a variety of formatting options to get as much\ninformation as you like). And if the relationship is more complex (i.e.,\nI want to see if I need to push _or_ pull):\n\n  gitk origin/master...\n\n-Peff\n"}]}