githubにコミットできます[重複]

Aug 18 2020

プロジェクトを準備し、Githubにコミットしたいと思います。また、Git + GitHubデスクトップがあり、VSCodeとターミナルを使用します。したがって、プロジェクトのあるフォルダー内のVSCodeのターミナルから「git」をチェックしようとすると、問題が発生します。

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

一般的なcmdを使用する場合はすべてOKです!どうすれば修正できますか?

回答

albeksdurf Aug 18 2020 at 10:18

これは、git実行可能(git.exe)ディレクトリがPATH変数に設定されていないため、PowerShellがそれを見つけることができないためです。

gitがインストールされているフォルダーを見つけて、PATHWindowsの環境変数エディターを使用して追加する必要があります。

この回答の詳細な手順を参照してください。