git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Git remote status
@ 2008-11-01 19:52 Gonsolo
  2008-11-01 20:11 ` Miklos Vajna
  2008-11-02  3:30 ` Jeff King
  0 siblings, 2 replies; 3+ messages in thread
From: Gonsolo @ 2008-11-01 19:52 UTC (permalink / raw)
  To: git

Hi!

If I switch branches with "git checkout master" git tells me something 
like "Your branch is ahead of the tracked remote branch 'origin/master' 
by 39 commits".
Is there a "git remote status" or git-status switch to get the same 
information without switching branches?
Sometimes it's valuable whether one should push changes (for example 
before installing a new Ubuntu version ;) ).

Thank you,

g

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

* Re: Git remote status
  2008-11-01 19:52 Git remote status Gonsolo
@ 2008-11-01 20:11 ` Miklos Vajna
  2008-11-02  3:30 ` Jeff King
  1 sibling, 0 replies; 3+ messages in thread
From: Miklos Vajna @ 2008-11-01 20:11 UTC (permalink / raw)
  To: Gonsolo; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 262 bytes --]

On Sat, Nov 01, 2008 at 08:52:48PM +0100, Gonsolo <gonsolo@gmail.com> wrote:
> Is there a "git remote status" or git-status switch to get the same 
> information without switching branches?

Just 'git checkout' should print the info for the current branch.

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: Git remote status
  2008-11-01 19:52 Git remote status Gonsolo
  2008-11-01 20:11 ` Miklos Vajna
@ 2008-11-02  3:30 ` Jeff King
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff King @ 2008-11-02  3:30 UTC (permalink / raw)
  To: Gonsolo; +Cc: git

On Sat, Nov 01, 2008 at 08:52:48PM +0100, Gonsolo wrote:

> If I switch branches with "git checkout master" git tells me something  
> like "Your branch is ahead of the tracked remote branch 'origin/master'  
> by 39 commits".
> Is there a "git remote status" or git-status switch to get the same  
> information without switching branches?

"git status" will do this automatically in recent versions of git (as of
1.6.0, I believe).

You can also use "git branch -v" to see a summary of how all branches
relate to their tracked counterparts.

> Sometimes it's valuable whether one should push changes (for example  
> before installing a new Ubuntu version ;) ).

For that, I might want to actually _see_ the changes. So I would use:

  git shortlog origin/master..

(or "log" with a variety of formatting options to get as much
information as you like). And if the relationship is more complex (i.e.,
I want to see if I need to push _or_ pull):

  gitk origin/master...

-Peff

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

end of thread, other threads:[~2008-11-02  3:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-01 19:52 Git remote status Gonsolo
2008-11-01 20:11 ` Miklos Vajna
2008-11-02  3:30 ` Jeff King

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).