Skip to main content
Marek Fořt

Importance of dotfiles

Recently, during macOS update, my Mac went bust. After some time in the recovery mode I was like "at least I have the Time Machine backup". I clicked the button to restore from my Time Machine, went to do some other things and after two hours I came to look how it was going. "Time Machine backup failed". Well, not great. I tried this for the second time with the same result. Since I wanted to do a clean install for some time, I thought that somebody is telling me now is the time. Clean install it is then.

After I was on my fresh macOS, I wanted to configure my CLI environment. And rather getting back to the unorganized dotfiles mess I had before, I decided to make it properly this time.

Why you should version your dotfiles #

I spend a lot of time in the CLI, therefore I find it very important that it is setup in a way I like. That is not only because I want the time I spend in my CLI to be pleasant (although, that is absolutely a good reason!) but also to be efficient.

To achieve that it is important to have a look at your dotfiles.

While a lot of users do personalize their CLI in some way, it is not at all so common that people version their changes to them. They are also strewn all around the home directory and it is very hard to be sure where you can find what. As a result, this might make it harder for you to make customizations, so in a lot of cases you will not make that small change that might make your life a little better at all. But in the long run this all adds up.

This was true in my case, too - I had no organization of my dotfiles and often I did not want to make a change because I was worried I might screw it up.

I have realized sometime ago I should do something with this but I just did not find the time - well, until I had to.

My dotfiles #

Instead of having the dotfiles for myself, I wanted to share them. I started with dotfiles by Zach Holman and then made adjustments to feel more at home - you can check the repo out here.

One of the more notable changes have been adding oh-my-zsh on top of zsh. Why? Well, a) oh-my-zsh has a great selection of themes. b) they have great plugins.

Some of the plugins I use are:

Apart from oh-my-zsh, I have also added for example keybindings for Xcode - this can be especially helpful if you reinstall Xcode because in that case you'd lose them (happened to me on multiple occassions).

Share #

I am not saying that the dotfiles I have are the best or that they will work for you. The point of this post is to share my experience and encourage you to invest in your environment. Let me know what your dotfiles look like and what has been working for you. Thanks for reading! ✨