Actions

EmSys

Git - Key Files and Directories

From EdWiki

Key Files and Directories

Git comes with a tool called git config that lets you get and set configuration variables that control all aspects of how Git looks and operates.These variables are stored in 3-different places depending on the option passed to git config.

  • /etc/gitconfig file
    If you pass the option --system to git-config, it reads and writes from this file specifically.
    Contains values for every user on the system and all their repositories.
  • ~/.gitconfig file
    If you pass the option --global to git-config, it reads and writes from this file specifically.
    Specific to your user.
  • .git/config file in the git directory of whatever repository you are currently using
    Specific to that single repository
    Each level overrides values in the previous level.
    Values in .git/config trump those in /etc/gitconfig.