The process of installing, configuring, and customizing Visual Studio to support development workflows across languages, platforms, and workloads.
Hello @Prasad Khalane ,
Thanks for your question.
Visual Studio 2022 uses its own internal Git and no longer has the option to switch to the system Git. To make the ggshield pre-commit hook work, I recommend installing it directly so the internal Git recognizes it.
You can refer to the following steps:
- Open your command line terminal.
- Navigate to your project folder and run
ggshield install --mode localto set it up for that specific repository. - Alternatively, run
ggshield install --mode globalto apply it to all repositories on your computer. - Ensure
ggshieldis added to your Windows system PATH so the built-in Git can find it. - Run
ggshield auth loginto authenticate if you have not done so already.
For more details on the installation commands, you can view the official documentation directly here.
While this is a non-Microsoft link, it’s official Gitguardian documentation and is safe to visit.
I hope this addresses your question. If this response was helpful, please consider following the guidance to provide feedback. Thank you.