git记住用户名和密码,避免每次输入

永久存储

git config --global credential.helper store

查看全局配置

# git config --global --list
credential.helper=store

查看当前配置

# git config --list
credential.helper=store
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=xxx.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.koudai.remote=origin
branch.koudai.merge=refs/heads/koudai

配置全局用户名

# git config --global user.name jiqing

配置全局邮箱

# git config --global user.email jiqing@xxx

获取名称

# git config user.name
jiqing

获取邮箱

# git config user.email
jiqing@xxx
原文地址:https://www.cnblogs.com/jiqing9006/p/8944345.html