git config git command of

About git config command

git config command is git some configurations that are written in the configuration file, so in fact git config command is equivalent to directly modify the corresponding configuration files, which it then there is the configuration file:

  • Warehouse-level configuration file: .git hidden files in the current repository root folder, a file named config
  • User-level configuration file: Usually in C: \ Users \ Admin path, file name .gitconfig
  • System-wide configuration files: in the installation directory of the local git, such as D: \ Git \ mingw64 \ etc, the file name gitconfig

Warehouse-level configuration file is only valid for the current warehouse location, warehouse-level configuration with the highest priority, followed by user-level configuration, system-wide configuration lowest priority.

View configuration information

// 查看仓库配置
git config --local -l

// 查看用户配置
git config --global -l

// 查看系统配置
git config --system -l

// 查看所有的配置信息,依次是系统级别、用户级别、仓库级别
git config -l

Agent Configuration and cancellation

Pull open the agent can accelerate the speed of the code, or really slow ... a group of configuration is as follows:

// 设置socks5代理
git config --global http.proxy "socks5://127.0.0.1:1080"
git config --global https.proxy "socks5://127.0.0.1:1080"

// 设置http代理
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080

// 取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy
Published 63 original articles · won praise 131 · views 360 000 +

Guess you like

Origin blog.csdn.net/u012043391/article/details/104578215