Any good recommendations?
For Git: https://git-scm.com/book/en/v2 - chapter 10 in particular covers internals.