emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Git question: specify branches to push


From: Phillip Lord
Subject: Re: Git question: specify branches to push
Date: Fri, 28 Nov 2014 10:35:11 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Stephen Berman <address@hidden> writes:

> I've pushed several commits to emacs-24 at Savannah, and each time git
> says the following:
>
>  ! [rejected]        master -> master (non-fast-forward)
> error: failed to push some refs to 'address@hidden:/srv/git/emacs.git'
> hint: Updates were rejected because a pushed branch tip is behind its remote
> hint: counterpart. If you did not intend to push that branch, you may want to
> hint: specify branches to push or set the 'push.default' configuration 
> variable
> hint: to 'simple', 'current' or 'upstream' to push only the current branch.
>
> Of course I didn't want to push master so it's good it was rejected, but
> it would be unpleasant if my master branch happens to be up to date when
> I push emacs-24 (or vice versa).  But how do I tell git to push only
> emacs-24 (or only master)?  I tried `git push emacs-24' and `git push
> origin/emacs-24' but it didn't recognize either as an existing branch.


This is the default behaviour for Magit, incidentally. You push and it
pushes the branch that you are on. Underneath, I guess, it's using
tracking branches (which automatically sets upstream branch).

Phil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]