threads / discuss / 55084

git config file

Subject: git config file

## tl;dr

2 messages between Feb 1, 2021 and Feb 1, 2021.

replies: 1people: 2as markdown or json

Terry Warren· Feb 1, 2021, 14:19 UTC · lore
can git environment variables (such as GIT_TRACE) be added to the git config file? The reason I am asking this question is that I am trying to troubleshoot a problem that only occurs when running git from within an IDE. Running from the command line shell works as expected.

thanks for any response Terry Warren

Taylor Blau· Feb 1, 2021, 17:08 UTC · re: Terry Warren · lore

Re: git config file

Hi Terry,
On Mon, Feb 01, 2021 at 06:19:01AM -0800, Terry Warren wrote:
> can git environment variables (such as GIT_TRACE) be added to the git
> config file? The reason I am asking this question is that I am trying
> to troubleshoot a problem that only occurs when running git from
> within an IDE. Running from the command line shell works as expected.

There isn't a way to define the GIT_TRACE variable, nor is there a general way to define arbitrary environment variables that should be set at the beginning of every Git process.

You can use the new trace2 sub-system, which does have configuration variables that you can hook into:

  https://git-scm.com/docs/git-config#Documentation/git-config.txt-trace2normalTarget

(beginning at the above link and continuing down). Alternatively, if your IDE supports it, you could set an environment variable by setting your git executable to be something like

  env GIT_TRACE=xyz /path/to/git
> thanks for any response
> Terry Warren

Thanks, Taylor

← back to recent threads