Git - 01. git config

1 Overview

  1. Configuration file management commands git
  2. Configuring regarded as the meta git

2. Scope

  1. Three kinds
    1. --local
    2. --global
    3. --system
  2. priority
    1. 1 > 2 > 3
  3. Specific documents
    1. slightly
  4. Defaults
    1. This is not yet known
      1. all
  5. use
    1. command

      > git config [--local|--global|--system] [option]

3. Command

1. Fields

  1. View

    # 包括了 三个范围 的 list
    > git config --list
    # 获取单个字段
    > git config --get <name>
  2. Add to

    > git config --add <name> <value>
  3. modify
    1. Repeat to add
      1. Scenes
        1. With add, already exist, it will add a
        2. It is behind the subject
    2. Renaming variables
      1. Seemingly not
  4. delete
    1. To delete a
      1. Scenes
        1. A field presence, and only one value
      2. command

        > git config --unset <name>
    2. To delete multiple
      1. Scenes
        1. Add multiple sets using the same variable
        2. Use the Delete one will prompt field has multiple values, and can not be deleted
      2. command

        > git config --unset-all <name>

4. Profiles

  1. Outline
    1. Temporarily slightly

5. questions

  1. Field
    1. Fields are just added it
      1. Yes, sure
    2. Meaning the field
      1. In help documentation Variables field below
        1. There are all the fields git support, and explain
        2. git config --help
    3. Rename the field
      1. Seemingly not
  2. section
    1. what is this
  3. Defaults
    1. Without default file is valid
  4. Command confusion
    1. Outline
      1. Many places, the same kind of operation, there are two commands
      2. I do not like this
        1. Likely to cause confusion
      3. I prefer a similar style like the restful
        1. To determine the specific resource command
        2. To operate on a resource request specific operation by different
    2. For example git
      1. View

        > git config <name>
      2. Add to

        > git config <name> <value>

Guess you like

Origin www.cnblogs.com/xy14/p/11103872.html
Git