Re: What means "git config bla ~/"?
- Date: Mon, 2 Oct 2017 16:06:29 +0200
- From: René Scharfe <l.s.r@xxxxxx>
- Subject: Re: What means "git config bla ~/"?
[When I try to reply to rpjday@xxxxxxxxxxxxxx then my SMTP server
says "Requested action not taken: mailbox unavailable
invalid DNS MX or A/AAAA resource record.", so I'm replying only
to the list.]
Am 02.10.2017 um 12:13 schrieb rpjday@xxxxxxxxxxxxxx:
> i'm sure i'm about to embarrass myself but, in "man git-config",
> OPTIONS, one reads:
> git-config will expand leading ~ to the value of $HOME, and ~user to
> the home directory for the specified user. This option has no
> effect when setting the value (but you can use git config bla ~/ from
> the command line to let your shell do the expansion).
> what's with that "git config bla ~/"? is this some config keyword or
"bla" represents any configuration option that you want to change. It
is not literally a keyword recognized by git config. You could replace
it with "foo", if that helps.
The comment in parentheses reminds readers that shells like bash do
tilde expansion for command line arguments. Consider the following
$ git config format.outputDirectory ~/patches
Your shell rewrites "~/patches" to "/home/rpjday/patches" (or similar,
depending on your user name and home directory) before actually
executing git config. So even though git config doesn't expand ~ in
option values you'll still get a result like this afterwards:
$ git config format.outputDirectory