Error: spawn git ENOENT

  • Read

Suddenly, I began to get such pop-up error message in the VSC and when I checked the output of extension, I got below more information:

[ 23:14:53 | command ] git rev-parse --show-toplevel
[ 23:14:53 | critical ] Error: spawn git ENOENT
[ 23:14:53 | info ] File "f:\GitLab\v2\models\class\stockadjustment.php" is not a decendant of a git repository
[ 23:15:23 | info ] Will not try to blame file "\extension-output-#3" as it is outside of the current workspace
[ 23:17:47 | command ] git rev-parse --show-toplevel
[ 23:17:47 | critical ] Error: spawn git ENOENT
[ 23:17:47 | info ] File "f:\GitLab\v2\models\class\refund.php" is not a decendant of a git repository

I tried to find solution through Google while most of the search results were not match my issue. When I clicked every file or maybe every line, I would get such error message so it was really annoying.

Just now, I found below way:

hexo部署问题:Error: spawn git ENOENT

I recalled I did not allow to add git command to the PATH environment parameter when I installed the Git program, so I added it to my user environment, then I restarted the VSC and such error message did go.


  • by Published on 26/10/2018 01:17:34
  • Repost please keep this link:


Anonymous Write

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: