Dries Vints does not blog often, but when he does it's very much worth your time to read.

We all have specific ways of setting up our computer. It's all different somehow. The apps we use, our IDE settings, what shell we prefer, what programming languages we work with, the tools we prefer. How on earth are we going to get that specific setup back the way we had it before our computer broke down? Enter dotfiles.

https://driesvints.com/blog/getting-started-with-dotfiles

You can find Dries' dotfiles on GitHub. Mine can be found here.