I have a repository where the .git
directory is not in the same location as the files being tracked. Because of this, when I open my project folder in VS Code I get no git support.
I cannot find a place to put the environment variables. In the terminal I would just do export GIT_DIR=~/somedir/
. I tried this in the VSC terminal but is only recognized for the terminal itself, not for the editor area (for example, to show which code I have changed).
I also found in settings Terminal > Integrated > Env : Linux that allows adding the environment variable to a settings.json but this is only recognized by the integrated terminal.
How do I set, in VS Code, the environment variable GIT_DIR
for my project to have git working properly?