From: Avery Pennarun Date: Wed, 20 Aug 2008 21:01:56 GMT Subject: Re: Local branch ahead of tracked remote branch but git push claims everything up-to-date Message-ID: <32541b130808201401l2ad105ccnc37acdacd08d4c3a@mail.gmail.com> In-Reply-To: <8585F10E-C33C-481E-B044-A7125F3316F2@web.de> On Wed, Aug 20, 2008 at 4:40 PM, Andreas Färber 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