Changing location of git global configuration in VS2019 16.8.2

JamesBurgess 21 Reputation points
2020-11-26T00:14:06.377+00:00

By watching files on disk change I can see if I go to Git->Settings->Source Control->Git Global Settings and change things like "Cryptographic network provider" I can see that it's writing .gitconfig in %HOMEDRIVE%%HOMEPATH% rather than %USERPROFILE% where it git seems to be finding my ssh configuration directory. Is there any way to alter this behavior? I'd like both ssh and git to look in %USERPROFILE%.

Also Git Global Settings seems to impose the email address of my msdn account over what is in the global .gitconfig file. Even if I change it in the settings dialog and hit ok, when I come back to the dialog it's gone back to the msdn address. So for that value, ignoring the .gitconfig file and not writing that value when edited.

There is also a bug here but I don't know if I should report this separately. If I go into Git->Options->Source Control->Git Repository Setting instead and change the email address in there, then the global user email value in the .gitconfig file gets overwritten to my msdn account address! I would expect changing the repository-specific address would not touch the global setting regardless of where they are stored. It does write into .git/config as you would expect. So the bug is writing to the global config file at the same time.

Community Center Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Dylan Zhu-MSFT 6,426 Reputation points
    2020-11-26T06:18:15.953+00:00

    Hi JamesBurgess,

    According to your description, it is more related to Github extension. We recommend you could post it to here: https://github.com/github/VisualStudio/issues, and then you could get dedicated support about it.

    Best Regards, Dylan

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our * *documentation* to enable e-mail notifications if you want to receive the related email notification for this thread.**

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.