Re: Git terminology: remote, add, track, stage, etc.
- From
- Eugene Sajine <euguess@gmail.com>
- Date
- Oct 22, 2010, 21:00 UTC
- Message-ID
- <AANLkTinUc2BW+BOTNMOC1t=3=rYzYgedyS5LFu37J+Yo@mail.gmail.com>
- In-Reply-To
- <1287778585.2025.14.camel@localhost.localdomain>
On Fri, Oct 22, 2010 at 4:16 PM, Paul Bolle <pebolle@tiscali.nl> wrote:
Show 28 quoted lines
> 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