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: Multiple checkout copies Date: Tue, 03 Feb 2015 18:05:56 +0100 Message-ID: <874mr32adn.fsf@fencepost.gnu.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422983187 3813 80.91.229.3 (3 Feb 2015 17:06:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Feb 2015 17:06:27 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 03 18:06:27 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 1YIgvi-0007nq-LM for ged-emacs-devel@m.gmane.org; Tue, 03 Feb 2015 18:06:26 +0100 Original-Received: from localhost ([::1]:60570 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIgvh-00035p-T8 for ged-emacs-devel@m.gmane.org; Tue, 03 Feb 2015 12:06:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42220) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIgvP-00034p-F2 for emacs-devel@gnu.org; Tue, 03 Feb 2015 12:06:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIgvH-000607-Ig for emacs-devel@gnu.org; Tue, 03 Feb 2015 12:06:07 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIgvH-0005zx-GQ for emacs-devel@gnu.org; Tue, 03 Feb 2015 12:05:59 -0500 Original-Received: from localhost ([127.0.0.1]:57340 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIgvG-0007W5-69 for emacs-devel@gnu.org; Tue, 03 Feb 2015 12:05:59 -0500 Original-Received: by lola (Postfix, from userid 1000) id CBC00E04E9; Tue, 3 Feb 2015 18:05:56 +0100 (CET) In-Reply-To: (Steinar Bang's message of "Tue, 03 Feb 2015 17:50:33 +0100") 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:182333 Archived-At: Steinar Bang writes: >>>>>> Richard Stallman : > >> Using git, is there a way to check out copies of different branches in >> parallel (in different directories) from the same clone of the >> repository? > > If you're not concerned with disk usage, the simplest way is something > like this (assuming you're placed in the directory above where the > current emacs is checked out as "emacs"): > cp -a emacs emacs-24 > cd emacs-24 > git checkout emacs-24 > > A slightly different version of the above will save disk space by using > hard links to files in the original repository: > git clone emacs emacs-24 > cd emacs-24 > git checkout emacs-24 > > (most of the repository is immutable, and it is the immutable stuff that > is hardlinked, so these two repositories will diverge over time, so the > space save is just initial) > > Note: neither of these approaches will let you share stuff between the > two clones without going by the remote server (however there are ways to > do so, if this is of interest). Sigh. The second method (creating a clone of the repo) will make this clone have the original repository as its upstream, not the remote one. So the second approach will _only_ let you share stuff by going through the first repository. -- David Kastrup