git 常用的一些命令
永久记住密码 (全局)
Git使用https方式进行连接时,默认每次推送时都要输入用户名和密码。
可以使用命令
git config credential.helper store
为当前仓库设置记住密码,设置后,只要在推送一次,以后就不需要用户名和密码了。
只要运行后,下次push/pull的时候再输入一次密码,git就会记住啦!再次push/pull的时候就不用输用户名和密码了。
修改用户名和邮箱的方法
全局修改
git config --global user.name "王老五"
git config --global user.email "abc@qq.com"
局部修改
git config user.name "王老五"
git config user.email "abc@qq.com"