git 配置 本地用户名称 和 邮件名称
很多次配置git用户名和邮箱了,总是会忘记,然后在网络上搜索,今天进行记录下来,防止遗忘:
# 查看用户名和邮箱地址(推荐使用,针对每个仓库使用,防止多人共用同一个账号,配置信息混乱的情况)
git config user.name
git config user.email
# 修改用户名和邮箱地址 git config --global user.name "username" git config --global user.email "email"
配置文件所在的位置:
/etc/gitconfig # 系统级别的配置 ~/.gitconfig # 当前用户级别的配置 git config --global 来进行修改 .git/config # git 仓库级别的配置
Git会优先使用库级别的配置,再然后是global级别的配置,最后是system级别的配置;
配置 git 默认使用 vim 编辑器:# 2022年03月31日12:09:19
git config --global core.editor "vim" # Set core.editor in your Git config:
资源来源自网络,保持更新;更多内容,请访问 cnblogs.com/xuyaowen;
## 中文转义,2023年10月18日10:17:53
git config --global core.quotepath false