Activate virtualenv for git command in Visual Studio Code

Viewed 461

I have a Python project on a Vagrant virtual machine (ubuntu 18.04.5 LTS) and I use Visual Studio Code to develop on it with the Remote SSH extension.

When I launch git commit I need to run it inside a virtual environment because there is a git hook that needs it.

In the workspace config file I have set "python.pythonPath" key, but it seems that is ignored from git.

How can I solve it? Thanks

0 Answers
Related