From: Junio C Hamano <junkio@cox.net>
To: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH/RFC] Convenient support of remote branches in git-checkout
Date: Mon, 06 Nov 2006 23:07:40 -0800 [thread overview]
Message-ID: <7vlkmn7n0j.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <200611070225.24956.Josef.Weidendorfer@gmx.de> (Josef Weidendorfer's message of "Tue, 7 Nov 2006 02:25:24 +0100")
Josef Weidendorfer <Josef.Weidendorfer@gmx.de> writes:
>> Then "git checkout origin/next" would always mean "I want to
>> switch to the branch I use to hack on the branch 'next' Junio
>> has". Do it once and you will get exactly my tip, hack on it,
>> switch out of it and then do it again and you won't lose your
>> previous work but just switch to that branch.
>
> Ah, now I understand your thinking.
> I admit it has a compelling elegance.
>
> However.
> Would it not be confusing for newbies (and not only for them) to
> first reference the remote branch with "origin/next", and afterwards, you
> get your own development branch by using the exactly same name?
In that example, the user types "git checkout origin/next". I
do not think there is any confusion.
You come from git background from the era git checkout did _not_
have this magic (in other words, "today"), so you implicitly see
remotes/ prefixed in front of the "origin/next" string there.
But new people do not see remotes/ prefixed there. To them, the
example command line says "Now I want to be on my 'origin/next'
branch", and there is nothing 'remote' about it.
The magic under discussion happens to create your 'origin/next'
branch automagically from 'remotes/origin/next' when it exists,
but that can be transparent to the user [*1*].
Well, your original magic did not propose it that way, but I
twisted it.
[Footnote]
*1* This is in line with what I wanted to say in my earlier "if
I were redoing git from scratch" message when I talked about
making "remotes" less visible.
prev parent reply other threads:[~2006-11-07 7:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-06 23:26 [PATCH/RFC] Convenient support of remote branches in git-checkout Josef Weidendorfer
2006-11-06 23:30 ` Josef Weidendorfer
2006-11-07 0:13 ` Junio C Hamano
2006-11-07 1:25 ` Josef Weidendorfer
2006-11-07 2:03 ` Junio C Hamano
2006-11-07 2:08 ` Junio C Hamano
2006-11-07 10:18 ` Josef Weidendorfer
2006-11-07 2:27 ` Junio C Hamano
2006-11-07 10:28 ` Josef Weidendorfer
2006-11-07 6:54 ` Karl Hasselström
2006-11-07 10:53 ` Josef Weidendorfer
2006-11-07 13:56 ` Karl Hasselström
2006-11-07 17:04 ` Josef Weidendorfer
2006-11-07 7:07 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vlkmn7n0j.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=Josef.Weidendorfer@gmx.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox