Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: git push won't push to a local branch

From: Björn Steinbrink <hidden>
Date: 2016-06-15 22:44:34

On 2008.05.04 11:49:38 -0700, Geoffrey Irving wrote:
Hello,

There's an asymmetry between push and pull that seems unnecessary:
pull can pull from local branches, but push can't push to them.  Is
there a reason for this asymmetry?

In more detail, if I have a working copy with two branches, local and
master, I can use git pull to pull changes from master to local:

% git checkout local
% git pull . master
... pulls changes from master to local branch

If I make a change in local and try to do the reverse with git push,
it gives a confusing non-error message and doesn't do anything:

% git checkout local
% git rm scratch/pcomm.h
% git commit
% git push . master
Everything up-to-date
You're pushing master to master ;-) Try "git push . local:master".

Björn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help