Pode se comprometer com o github [duplicado]

Aug 18 2020

Preparei um projeto e gostaria de me comprometer com o Github. A também tem desktop Git + GitHub e usa VSCode e terminal nele. Então, quando tento verificar o 'git' do terminal no VSCode na pasta com o projeto, tenho o problema:

git : The term 'git' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ git
+ ~~~
    + CategoryInfo          : ObjectNotFound: (git:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Ao usar o cmd comum, tudo está OK! Como eu poderia consertar?

Respostas

albeksdurf Aug 18 2020 at 10:18

Isso ocorre porque o diretório gitexecutable ( git.exe) não está configurado na PATHvariável, então o PowerShell não consegue localizá-lo.

Você precisa localizar a pasta na qual o git está instalado e adicioná-lo PATHusando o editor de variáveis ​​de ambiente do Windows.

Veja instruções detalhadas nesta resposta .