git config配置

发布时间 2023-05-08 16:01:05作者: caseyzz

配置git用户名用来拉取代码:
1.查看当前用户名

git config user.name
git config user.email
git config user.password

2.设置用户名密码

git config --global user.name "zhangsan(新的用户名)"
git config --global user.email "123456@qq.com(新的邮箱)"
git config --global user.password "123456(新的密码)"

3.git如何记住用户名密码,不需要每次git pull都输入用户信息

git config --global credential.helper store
git pull (这里需要输入用户名和密码,以后就不用再输入啦)

此后每次pull push git都会记住用户名,密码