Re: Local branch ahead of tracked remote branch but git push claims everything up-to-date

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: Local branch ahead of tracked remote branch but git push claims everything up-to-date

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:11

"Avery Pennarun" [off-list ref] writes:
On Wed, Aug 20, 2008 at 4:40 PM, Andreas Färber [off-list ref] wrote:
quoted
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.
I think we have long been doing so.  Daniel, correct me.

Re: Local branch ahead of tracked remote branch but git push claims everything up-to-date

From: Avery Pennarun <hidden>
Date: 2016-06-15 22:45:11

On Wed, Aug 20, 2008 at 5:15 PM, Junio C Hamano [off-list ref] wrote:
"Avery Pennarun" [off-list ref] writes:
quoted
On Wed, Aug 20, 2008 at 4:40 PM, Andreas Färber [off-list ref] wrote:
quoted
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.
I think we have long been doing so.  Daniel, correct me.
...and I'm dumb.

I apologize.  "git pull origin mybranch" does not update
origin/mybranch.  "git push origin mybranch" does.

It could be argued that pull should update the local reference too,
but that's irrelevant at the moment.

Have fun,

Avery

Re: Local branch ahead of tracked remote branch but git push claims everything up-to-date

From: Daniel Barkalow <hidden>
Date: 2016-06-15 22:45:11

On Wed, 20 Aug 2008, Avery Pennarun wrote:
On Wed, Aug 20, 2008 at 5:15 PM, Junio C Hamano [off-list ref] wrote:
quoted
"Avery Pennarun" [off-list ref] writes:
quoted
On Wed, Aug 20, 2008 at 4:40 PM, Andreas Färber [off-list ref] wrote:
quoted
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.
I think we have long been doing so.  Daniel, correct me.
...and I'm dumb.

I apologize.  "git pull origin mybranch" does not update
origin/mybranch.  "git push origin mybranch" does.

It could be argued that pull should update the local reference too,
but that's irrelevant at the moment.
That is actually to say that fetch should do it (pull calls fetch for that 
part), and I agree with that, assuming you've actually got that fetch 
config, of course.

	-Daniel
*This .sig left intentionally blank*
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help