This is because the attributes of the currently connected user are not declared. The solution is to
configure them directly .
git config --global user.name "xxxx" // 设置自己的用户名
git config --global user.email "[email protected]" // 设置自己的邮箱
Then enter
git config --global -l
You can see the configuration you just made, and the .gitconfig file also exists!
You're done!