emacs-devel
[Top][All Lists]
Advanced

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

Re: Multiple checkout copies


From: David Kastrup
Subject: Re: Multiple checkout copies
Date: Tue, 03 Feb 2015 18:05:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Steinar Bang <address@hidden> writes:

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

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



reply via email to

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