[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: |
Wed, 04 Feb 2015 09:55:30 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Achim Gratz <address@hidden> writes:
> Richard Stallman writes:
>> > 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
>>
>> Thanks. Maybe that is what I want to do.
>>
>> My idea is to do my editing in the 'emacs' directory, as well as
>> pulling updates there. So these points seem like features rather than
>> bugs.
>
> The safest (but a bit more long-winded) way of dealing with simultaneous
> work on multiple branches is IMHO this setup (per example doing work on
> master and emacs-24):
>
> $ git clone git://git.savannah.gnu.org/emacs.git --bare emacs.git
> $ git clone emacs.git/ emacs-master
> $ git clone emacs.git/ emacs-24
> $ cd emacs-24 ; git checkout emacs-24 ; cd ..
>
> This way there's only a single repository to push upstream from (which
> also makes it a bit easier to check what you intend to push). Making
> this bare ensures you don't do any other work on this repo.
Minus the bare repository (I use my main repository) this is basically
what I do when I find I need to work on a different branch temporarily.
The difference is that I create my cloned directories on-demand and
remove them again once the work has been pushed upstream or integrated
wherever it is supposed to go.
While it isn't as formal a way to work as having one dedicated bare
repository, it is easy to do ad-hoc without prior setup. Yes,
ping-ponging changes through the main repository is a bit of a nuisance.
--
David Kastrup
Re: Multiple checkout copies, Steinar Bang, 2015/02/03