Read Git-based deploy first: everything else follows from what a push does on the server, a hard reset of the site folder to the branch followed by a cache clear. A branching strategy that works turns that into a release process, with the hotfix path and the merge-back that keeps staging and production in step.
The next two pages are the failures that a hard reset produces. Build before you push covers the most common one, a deploy that succeeds and serves an old build, and FTP and tracked files the edit made on the server that the next push removes. What CI can do for a theme repo closes the unit with a minimal pipeline that automates the checks from the pages before it. What travels with a push and what does not, layouts, jobs, forms and settings among them, is the next unit's subject.