From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@newcastle.ac.uk (Phillip Lord) Newsgroups: gmane.emacs.devel Subject: Re: Git question: specify branches to push Date: Fri, 28 Nov 2014 10:35:11 +0000 Message-ID: <87k32f8vfk.fsf@newcastle.ac.uk> References: <87sih5lyzd.fsf@rosalinde.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1417170944 28974 80.91.229.3 (28 Nov 2014 10:35:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Nov 2014 10:35:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stephen Berman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 28 11:35:37 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XuIti-0001bO-Tl for ged-emacs-devel@m.gmane.org; Fri, 28 Nov 2014 11:35:35 +0100 Original-Received: from localhost ([::1]:43402 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuIth-0002Y7-Ve for ged-emacs-devel@m.gmane.org; Fri, 28 Nov 2014 05:35:33 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43113) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuItT-0002Xz-IW for emacs-devel@gnu.org; Fri, 28 Nov 2014 05:35:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XuItO-0008Bg-ON for emacs-devel@gnu.org; Fri, 28 Nov 2014 05:35:19 -0500 Original-Received: from cheviot22.ncl.ac.uk ([128.240.234.22]:51976) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuItO-0008BQ-Io for emacs-devel@gnu.org; Fri, 28 Nov 2014 05:35:14 -0500 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129] helo=smtpauth.ncl.ac.uk) by cheviot22.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1XuItM-0004KF-DQ; Fri, 28 Nov 2014 10:35:12 +0000 Original-Received: from jangai.ncl.ac.uk ([10.66.67.223] helo=localhost) by smtpauth.ncl.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1XuItM-0003wf-07; Fri, 28 Nov 2014 10:35:12 +0000 In-Reply-To: <87sih5lyzd.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Thu, 27 Nov 2014 11:27:50 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 128.240.234.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:178407 Archived-At: Stephen Berman 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 'srb@git.sv.gnu.org:/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