Oh yeah, the Git internals...
I tried to find my way through them using visualization but did not progress much: https://github.com/smartmic/git2pic
It's not a book, just a series of five short blog posts. Part 1 explains precisely where files live: https://alexwlchan.net/a-plumbers-guide-to-git/1-the-git-obj...
$ mkdir animals
$ cd animals
$ git init
$ echo "Big blue basilisks bawl in the basement" > animals.txt
$ git hash-object -w animals.txt
b13311e04762c322493e8562e6ce145a899ce570
$ find .git/objects -type f
.git/objects/b1/3311e04762c322493e8562e6ce145a899ce570
$ rm animals.txt
$ git cat-file -p b13311e04762c322493e8562e6ce145a899ce570 > animals.txt
Congratulations, you just did a `git restore animals.txt` manually.Parts 2 through 5 are equally illuminating.
https://www.devopsschool.com/blog/git-tutorial-objects-refer...