'git --version command not working on VS code

I am starting with Git and the comand line, when trying to see my GIT version with git --version command, it does not work on VS code, but it does in CMD windows terminal. What is wrong with VS code terminal?

VS code message

PS C:\Users\Nico\Desktop\Proyectos Fokerson> git --version Error al ejecutar el programa 'git.exe': Acceso denegadoEn línea: 1 Carácter: 1

  • git --version
  • 
    

En línea: 1 Carácter: 1

  • git --version
  •    + CategoryInfo          : ResourceUnavailable: (:) [], 
       ApplicationFailedException
       + FullyQualifiedErrorId : NativeCommandFailed
    
    

CMD message

C:\Users\Nico>git --version git version 2.34.1.windows.1

Tried moving directories on VScode with cd.. but not working



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source