From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Git help: amending a substandard commit message in savannah. Date: Mon, 23 Nov 2015 21:17:14 +0100 Message-ID: <87egfg5v3p.fsf@fencepost.gnu.org> References: <20151123105151.GA2004@acm.fritz.box> <5652F1EE.2080104@porkrind.org> <871tbh6je3.fsf@fencepost.gnu.org> <5653699D.3040707@porkrind.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1448309890 20208 80.91.229.3 (23 Nov 2015 20:18:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 Nov 2015 20:18:10 +0000 (UTC) Cc: Alan Mackenzie , emacs-devel@gnu.org To: David Caldwell Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 23 21:18:09 2015 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 1a0xYu-0006vE-4A for ged-emacs-devel@m.gmane.org; Mon, 23 Nov 2015 21:18:08 +0100 Original-Received: from localhost ([::1]:34440 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0xYu-0008Et-WB for ged-emacs-devel@m.gmane.org; Mon, 23 Nov 2015 15:18:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0xYq-0008ER-SC for emacs-devel@gnu.org; Mon, 23 Nov 2015 15:18:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0xYq-0007Jh-0H for emacs-devel@gnu.org; Mon, 23 Nov 2015 15:18:04 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0xYp-0007Jd-Tw; Mon, 23 Nov 2015 15:18:03 -0500 Original-Received: from localhost ([127.0.0.1]:57713 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1a0xYp-0008Lh-63; Mon, 23 Nov 2015 15:18:03 -0500 Original-Received: by lola (Postfix, from userid 1000) id 34590DF937; Mon, 23 Nov 2015 21:17:14 +0100 (CET) In-Reply-To: <5653699D.3040707@porkrind.org> (David Caldwell's message of "Mon, 23 Nov 2015 11:31:41 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:195142 Archived-At: David Caldwell writes: > On 11/23/15 3:32 AM, David Kastrup wrote: > >> So you can use >> >> git push origin :branch_to_be_deleted >> >> in order to delete the branch, but once it is gone, you need to do >> >> git push origin HEAD:refs/heads/branch_to_be_deleted >> >> in order to recreate it (after which it is again possible to refer to it >> using just branch_to_be_deleted). > > Er, what? That's not right. Once you've deleted a branch on the remote > git server you can just push it back using whatever command you created > it with in the first place. Of course the commands you gave will work, > but it's over-complicating things certainly not required. You can do > this all day: > > git push origin :branch_to_be_deleted > git push origin branch_to_be_deleted _Iff_ the reference you push has the name branch_to_be_deleted in the first place. If you name the reference explicitly, namely if your pushing command contains a : sign, then you need the full reference name on the right side of the :. If you only name one reference, then the disambiguation used for finding the reference in the local repository will be pushed to the remote side. Try git push origin HEAD:branch_to_be_deleted to see what I mean. Or even git push origin branch_to_be_deleted:branch_to_be_deleted -- David Kastrup