I've had all these plus PSU failure, network adapter failure, OS post-update self-destruction and more.
I push code a couple of times a day. If something goes horribly wrong I just pick up another computer, pull the code, and continue working while I wait for a repair/part for the main computer (or for an OS to reinstall).
If your computer becomes a brick, just use a different computer.