How it works...

Git's configuration is stored in plain text files and works like a key-value storage. You can set/query by key and get the value back. An example of the text-based configuration file is shown as follows (from the jgit repository):

$ cat .git/config
  [core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
  [remote "origin"]
    url = https://git.eclipse.org/r/jgit/jgit
    fetch = +refs/heads/*:refs/remotes/origin/*
  [branch "master"]
    remote = origin
    merge = refs/heads/master

Get Git Version Control Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.