Git常用配置

Git设置默认用户名和密码

1.进入C:usersAdministrator目录下,通过git bash终端输入touch .git-credentials后回车
2.打开生成的.git-credentials的文件,输入以下内容:
touch .git-credentials
vim .git-credentials
https://{username}:{password}@github.com
保存文件。
3.进入git bash终端,输入git config --global credential.helper store后回车,会创建一个.gitconfig文件。
4.重启电脑,完成

原文地址:https://www.cnblogs.com/smallkure/p/8085621.html