How to add, change or delete global data (for example, user.name or user.email ) in the Git version control system? The --unget command --unget some reason does not work.

  • Just wondering, where --unget ? - Nick Volynkin
  • In the help to the gita in the Action section there is such a command --unset remove a variable: name [value-regex]. I thought that this command should be used to delete global data. Did not work. - Oleg Cuxhausen

1 answer 1

Using git config

 git config --global user.email "your_email@example.com" git config --global user.name "Your Name" 
  • Those. if I want to delete user.name, then I have to use the following git config --global user.name "" (leave a space in the place of the name)? - Oleg Cuxhausen
  • @OlegKuxsausen Well, you can do this, for example: git config --global --unset-all user.name - Kostiantyn Okhotnyk
  • @OlegKuxsausen add git config --global --add user.name NAME - Kostiantyn Okhotnyk
  • Both (deletion and addition) of the proposed method work. Thank. Nuance, in the command to add user.name, the name itself must be written in brackets, i.e. like this git config --global --add user.name "NAME". The proposed user.name deletion command deletes not only the name (variable) itself, but also the variable itself. With the git config --global user.name "" command (leave a space in the place of the name) you can delete the name itself, while the variable will remain in the global data. Thanks again for the help. - Oleg Cuxhausen
  • @ Oleg Kuxgausen please) - Kostiantyn Okhotnyk