Git Cmd-config:get and set repository or global options

Source: Internet
Author: User

Command parameters

--get

Gets the specified configuration item.

--global

For write options: Global configuration, configure the parameters in ~/.gitconfig instead of the. Git/config in the Warehouse directory. For read options: Only the configuration is read from the ~/.gitconfig file.

--local

For write options: Configure the parameters to the. Git/config in the warehouse directory, which is the default setting.

-L,--list

Lists all configuration items in the configuration file.

Configuration file

If the--file option is not specified, there are 4 files for git to configure the query configuration item.

$ (prefix)/etc/gitconfig

System-wide configuration files

~/.gitconfig

A user-specific configuration file, also known as a global profile.

$XDG _config_home/git/config

User-specific secondary configuration files. If $XDG _config_home is not set or empty, $HOME/.config/git/config will be replaced.

$GIT _dir/config

A warehouse-specific configuration file.

Instance

A) Set user name and user message ID

$ git config--global user.name "Huey" $ git config--global user.email "[Email protected]"

b) Set color highlighting

$ git config--global color.ui true

c) List the current configuration options

$ git config--list

More

Http://git-scm.com/docs/git-config

Git Cmd-config:get and set repository or global options

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.