第一次使用git时候,首先需要进行一些配置
1.配置git的用户名
git config --global user.name "your name"
2.配置git的用户邮箱
git config --global user.email "your email"
3.为了防止这个傻逼git每次都进行操作让你输入用户名和密码,我们执行下面的命令
git config --global credential.helper store
永久记住密码,在用户主目录下的.gitconfig
文件中生成相关配置。
如果想临时记住密码,可以使用如下命令:
git config –global credential.helper cache # 默认记住15min
或者
git config credential.helper 'cache –timeout=3600' # 指定过期时间