git config命令用来配置git

1、仓库级别 local 【优先级最高】

2、用户级别 global【优先级次之】

3、系统级别 system【优先级最低】

查看仓库配置

$ git config --local -l
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
remote.origin.url=https://github.com/xx/sparkad.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.main.remote=origin
branch.main.merge=refs/heads/main

查看用户配置

$ git config --global -l
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
user.name=xx
user.email=xx@sina.com
core.autocrlf=true
credential.helper=manager

查看系统配置

git config --system -l 

编辑配置文件

git config -e 编辑配置文件 
git config --local -e 编辑仓库级别配置文件
git config --global -e 编辑用户级别配置文件
git config --system -e 编辑系统级别配置文件

参考

git config配置 - fireporsche - 博客园

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐