Flutter - Error: Unable to find git in your PATH

527 阅读1分钟

更新flutter版本后,运行flutter指令提示出错:

Error: Unable to find git in your PATH

但是git的环境变量确认后是正确的

搜索发现,是git权限问题,如果不是信得过的文件夹git会报错

将所有文件夹都指定为安全,你也可以将指定的文件夹设定为安全

git config --global --add safe.directory '*'