[OT] Question about Git branches

Chris Angelico rosuav at gmail.com
Tue Sep 16 14:48:45 CEST 2014


On Tue, Sep 16, 2014 at 10:14 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> Chris Angelico wrote:
>
>> On Tue, Sep 16, 2014 at 6:21 PM, Marko Rauhamaa <marko at pacujo.net> wrote:
>>> "Frank Millman" <frank at chagford.com>:
>>>
>>>> You are encouraged to make liberal use of 'branches',
>>>
>>> Personally, I only use forks, IOW, "git clone". I encourage that
>>> practice. Then, there is little need for "git checkout". Instead, I just
>>> cd to a different directory.
>>>
>>> Branches and clones are highly analogous processwise; I would go so far
>>> as to say that they are redundant.
>>
>> But rather than listening to, shall we say, *strange* advice like
>> this, Frank, you'll do well to pick up a reliable git tutorial, which
>> should explain branches, commits, the working tree, etc, etc, etc.
>
> Isn't this "strange advice" standard operating procedure in Mercurial? I'm
> not an expert on either hg or git, but if I've understood hg correctly, the
> way to begin an experimental branch is to use hg clone.

I don't know Mercurial well enough to be able to say, but definitely
branching is a very normal thing there, too. And since merging can be
done only within a single repo, ultimately you need to end up with
branches in one repo (rather than separate repos) if you're going to
combine them in any way. So even if you do start some experimental
work in a separate clone, you're probably going to need to end up with
it as a separate branch in the same repo if you ever publish it, for
instance.

ChrisA



More information about the Python-list mailing list