Configuring Git

We can configure Git using the git config command. This command will manipulate the .git/config file on our behalf. In fact, if we print the content of the .git/config file, you'll see that it is similar to the output of the git config command:

$ cd ~/projects/hobnob/$ cat .git/config[core]    repositoryformatversion = 0    filemode = true    bare = false    logallrefupdates = true$ git config --list --localcore.repositoryformatversion=0core.filemode=truecore.bare=falsecore.logallrefupdates=true
Feel free to examine the .git directory using a tool such as tree. First, install tree by running sudo apt install tree. Then, run tree ~/projects/hobnob/.git.

To configure Git, we must first understand that there are three scopes, or levels, ...

Get Building Enterprise JavaScript Applications 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.