git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Avery Pennarun" <apenwarr@gmail.com>
To: "Andreas Färber" <andreas.faerber@web.de>
Cc: ir0s <imirene@gmail.com>, git@vger.kernel.org
Subject: Re: Local branch ahead of tracked remote branch but git push claims everything up-to-date
Date: Wed, 20 Aug 2008 17:01:56 -0400	[thread overview]
Message-ID: <32541b130808201401l2ad105ccnc37acdacd08d4c3a@mail.gmail.com> (raw)
In-Reply-To: <8585F10E-C33C-481E-B044-A7125F3316F2@web.de>

On Wed, Aug 20, 2008 at 4:40 PM, Andreas Färber <andreas.faerber@web.de> wrote:
> You need to name the local branch, not the remote one:
>
> $ git push origin mybranch
>
> It should then push to remotebranch.

Not only that, but the "ahead of tracked branch" message depends on
your local copy of the remote branch, not the remote copy of the
remote branch.  So after pushing, you have to do:

   git fetch origin

I've often wondered if we can't just have push refetch the updated
remote ref automatically.  It's extremely hard to explain to newbies
that after a push, the order of refs from newest to oldest is 'origin
master', 'master', and 'origin/master'.

Have fun,

Avery

  reply	other threads:[~2008-08-20 21:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-20 20:26 Local branch ahead of tracked remote branch but git push claims everything up-to-date ir0s
2008-08-20 20:37 ` Alex Riesen
2008-08-20 20:40 ` Andreas Färber
2008-08-20 21:01   ` Avery Pennarun [this message]
2008-08-20 21:15     ` Junio C Hamano
2008-08-20 21:22       ` Avery Pennarun
2008-08-20 22:25         ` Daniel Barkalow
2008-08-20 22:46           ` Junio C Hamano
2008-08-21 15:35             ` ir0s
2008-08-21 16:22               ` Michael J Gruber
2008-08-21 16:53                 ` ir0s
2008-08-22 14:09                   ` Michael J Gruber
2008-08-21 16:55                 ` ir0s

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=32541b130808201401l2ad105ccnc37acdacd08d4c3a@mail.gmail.com \
    --to=apenwarr@gmail.com \
    --cc=andreas.faerber@web.de \
    --cc=git@vger.kernel.org \
    --cc=imirene@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).