Skip to content

Instantly share code, notes, and snippets.

@acgraf
acgraf / git-config.md
Last active March 31, 2023 13:40
git-config

Using git config to determine non-default behavior

Git uses the tool git config to determine and change non-default behaviour. git config sets configuration variables to control all aspects of how Git looks and operates. Three configuration files in different places store configuration variables on different levels. Git checks these files one after the other to find these variables.

  • The first file git checks: /etc/gitconfig
    This contains settings that are applied to every user on the system + all their repositories
    system-wide
@acgraf
acgraf / gitconfig.ini
Created March 29, 2023 16:56 — forked from tdd/gitconfig.ini
Nice, useful global Git configuration
# Put this in your ~/.gitconfig or ~/.config/git/config
# Windows users: "~" is your profile's home directory, e.g. C:\Users\<YourName>
[user]
name = Your Full Name
email = your@email.tld
[color]
# Enable colors in color-supporting terminals
ui = auto
[alias]
# List available aliases