emacs-devel
[Top][All Lists]
Advanced

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

Re: Multiple checkout copies


From: Steinar Bang
Subject: Re: Multiple checkout copies
Date: Tue, 03 Feb 2015 17:50:33 +0100
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4 (windows-nt)

>>>>> Richard Stallman <address@hidden>:

> 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).




reply via email to

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