From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.devel Subject: Re: Use of git branches Date: Fri, 06 Nov 2015 11:05:36 -0500 Message-ID: References: <20151106085750.28172.54745@vcs.savannah.gnu.org> <83bnb7sbiz.fsf@gnu.org> <87bnb73026.fsf_-_@members.fsf.org> <8337wjs8we.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1446826213 15113 80.91.229.3 (6 Nov 2015 16:10:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Nov 2015 16:10:13 +0000 (UTC) Cc: Eli Zaretskii , Nicolas Richard , Emacs developers To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 06 17:10:12 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 1Zujad-0007Qf-Sf for ged-emacs-devel@m.gmane.org; Fri, 06 Nov 2015 17:10:12 +0100 Original-Received: from localhost ([::1]:39705 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zujad-0004xA-Hh for ged-emacs-devel@m.gmane.org; Fri, 06 Nov 2015 11:10:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zuja5-0004ks-Sh for emacs-devel@gnu.org; Fri, 06 Nov 2015 11:09:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zuja5-00087n-0t for emacs-devel@gnu.org; Fri, 06 Nov 2015 11:09:37 -0500 Original-Received: from mail-vk0-x22f.google.com ([2607:f8b0:400c:c05::22f]:33661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zuja3-00086U-Gn; Fri, 06 Nov 2015 11:09:35 -0500 Original-Received: by vkbk63 with SMTP id k63so5592546vkb.0; Fri, 06 Nov 2015 08:09:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mail-followup-to:mime-version:content-type; bh=FfYcdpJJKldPILA5d2aWfSOQCp/2t+KuzTsYZ/Ub+X0=; b=wiWONu2HvYOQp/nxAxVc6/6P5lUQoUOi3yZuwPJRfzA3XxCKxGnkvj5kf1rzV7i/Oa Xu3XRl97iI6z1p5OdtRSTJTCOQ33l5kA1aaaLc73bMWsha5Bsi41ptjtabemUpk1Ugmo XykK18mAzub6ExcEavGF2+QV1LTVA//oPfBw/gKX9SeW1zWjzTbPt0gnCiC45G9jyQje y43c1v3DlErtE/G/Hnqvy6bodBYj5F9Vkn4/rpgOeBnTTMULxudQOAZ68h+7fn7dWUqo MyOOMkS8qpV6NuzGBtLPUrDHvJsfmd+eMeBG0y4R3BPw6Pzb2e1V61Mu2tEIR1TAOxvl jAiQ== X-Received: by 10.31.161.149 with SMTP id k143mr14473876vke.121.1446826175089; Fri, 06 Nov 2015 08:09:35 -0800 (PST) Original-Received: from Hermes-2.local ([216.57.92.130]) by smtp.gmail.com with ESMTPSA id b184sm594698vkf.28.2015.11.06.08.09.31 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 06 Nov 2015 08:09:32 -0800 (PST) X-Google-Original-From: "John Wiegley" Original-Received: by Hermes-2.local (Postfix, from userid 501) id 8540048F2AA9; Fri, 6 Nov 2015 11:09:29 -0500 (EST) In-Reply-To: (Juanma Barranquero's message of "Fri, 6 Nov 2015 14:54:58 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Mail-Followup-To: Juanma Barranquero , Eli Zaretskii , Nicolas Richard , Emacs developers X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400c:c05::22f 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:193444 Archived-At: >>>>> Juanma Barranquero writes: > I know that some old branches (though not all) are perhaps of historical > interest. But, isn't there any way to remove them and yet keep their content > from being pruned? Tags or something? You can move branches into a different "ref space" on the server (this is not tested yet, but should give the idea): git push origin refs/remotes/origin/old-branches/foo:refs/history/branches/foo git push origin :refs/old-branches/foo Historical branches are not fetched until you add the corresponding refspec to your .git/config file: [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* fetch = +refs/history/*:refs/remotes/origin/history/* Now you can write: git log origin/history/branches/Boehm-GC John p.s. This same trick works for GitHub PRs, btw, by using: fetch = +refs/pull/*:refs/remotes/origin/pr/* Now allowing you to: git checkout -b pr/1233 origin/pr/1233