Re: Git terminology: remote, add, track, stage, etc.

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

 



On Fri, Oct 22, 2010 at 4:16 PM, Paul Bolle <pebolle@xxxxxxxxxx> wrote:
> On Tue, 2010-10-19 at 11:09 -0400, Eugene Sajine wrote:
>> There should be some different consistent and not inter-crossing
>> naming for the origin's master branch (on the remote side), for the
>> local origin/master and for local master that is a tracking branch.
>> The only way i found so far to explain this is actually via the naming
>> syntax where having / in the name of the branch means remote branch. I
>> was a bit surprised that i can create a local branch with a slash in
>> the name - probably it should be prohibited.
>
> Allowing local branches with a slash in their name is a feature I use
> heavily. Ie, in general my local repositories use this scheme:
>
> $ git branch
> * master
> Â$BRANCH_F00
> Â$USER/$TOPIC_FOO
> Â$USER/$TOPIC_BAR
> Â[...]
> Â$USER/$TOPIC_BAZ
>
> This makes it trivial to quickly distinguish my (local) work from other
> people's (remote) work. Does the benefit of naming clarity justify
> prohibiting that scheme?
>
>
> Paul Bolle
>
>

Well, my approach is to use:
master - local
mybranch - local

remote from user
$ git remote add jdoe ~jdoe/project/.git

Then remote-tracking branches will be
jdoe/master
jdoe/featurex

my local branches tracking remote-tracking branches (automatic push, pull)
jd_master
jd_featurex

in this case there is no confusion between jdoe/master that is a
remote-tracking branch checkout to which will lead to detached HEAD
state and jd_master that is a local branch.

As in this syntax the slash is that meaningful, i think that reserving
this syntax "remote/branch" to the remote-tracking branches only makes
sense.

Thanks,
Eugene
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]