On 11/17/2010 09:54 AM, Bruce Korb wrote:
>> Are you trying to push to both master and libposix, or just libposix?
> 
> To both?  If it is possible to inadvertently push to both, then
> the git interface needs some serious work.
> 
>> There are some git configurations for controlling whether 'git push'
>> tries to push to one or all possible branches; whether it makes sense to
>> tune them different from the defaults depends on your most frequent
>> workflow habits.
> 
> My most frequent work flow habit is to use one development thread.

For historical reasons, 'git push' tries to push as many places as
possible.  But for your setup, I'd recommend 'git config --global
push.default tracking', which changes to only push the branch you are
working on to its upstream branch, and leave all other branches alone.

Take it up on the git list if this should be the new default, but be
aware that in distributed setups with heavy merging (that is, things
like git.git itself), it is a nicer default to push multiple branches in
one go.

Anyways, you can always use a directed push to say exactly what you
mean, rather than relying on the no-arg 'git push' defaults.  Assuming
your local branch names match upstream:

git push origin topic/libposix

> To ssh://bk...@git.sv.gnu.org/srv/git/gnulib
>    e633b39..2d39e49  topic/libposix -> topic/libposix
>  ! [rejected]        master -> master (non-fast-forward)
> error: failed to push some refs to 'ssh://bk...@git.sv.gnu.org/srv/git/gnulib'

Yep - you've now rebased your libposix branch, but the 'git push'
defaults are still trying to push master as well.  Changing those
defaults, or being more specific with your push request, will avoid that
problem.

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to