Re: [PATCH v2 03/15] user-manual: Use 'remote add' to setup push URLs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 10, 2013, 22:45 UTC
- Message-ID
- <7vsj53rdnc.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20130210215442.GB8000@odin.tremily.us>
"W. Trevor King" <wking@tremily.us> writes:
Show 10 quoted lines
> On Sun, Feb 10, 2013 at 01:33:31PM -0800, Junio C Hamano wrote: >> Look at how "Fetching branches from other repositories" is done. It >> shows the use of "remote add" and then shows the result by running >> "cat" to show the contents. >> >> I think that organization is much nicer than completely hiding how >> the result looks like behind another "git config --set" call, like >> the latter half of this patch does. > > I think for new users, `git config …`'s opacity may a good thing
No. Reducing the fear factor from new users by not hiding simple things is one of the design of these tutorials, and showing that the contents of .git/config is a simple, human-readable plain text file is a part of it.
> I'm fine with this too, but if this is the suggested route, why bother > with `git config` at all? Is it just for ease of scripting?
I would actually say why bother with `git remote` at all, when you can do that with `git config`, but arguably when a Porcelain that is type-specific exists, use of it would make the life of end users easier, and that is why we ended up having `git remote add`. So if you know how the remote configuration is implemented, you can still use `config` to do the same, but `remote add` that futzes with many variables at once would be easier to use for most people.