打开git bash命令行工具。 注意要加上--global。网上很多资料都没加这个参数。不加执行的话会报以下错误的: error:could not lock config file .git/config: no such file or directory.