4 Reasons to Create Your dotfiles Repo Today
If you have no idea what a dotfile repo is, follow along…
Dotfiles are the configuration files used by certain programs, which may contain user-defined settings that customize the "look and feel" or the behavior of those programs. Those files are usually prefixed with a period ".", hence the name.
The wonder about dotfiles is that they can be shared, and this brings multiple benefits.
So, how is this useful? How can I use these dotfiles?
1. Sync configuration between computers
If you share a dotfile between two or more computers, the program that uses that dotfile will behave the same way on all computers. This can be super useful to:
Set up a new computer;
Keep the configuration between multiple computers in sync (e.g. your home desktop and work laptop);
Mass-config multiple computers.
You make your life even easier if you, on top of git-versioning your dotfiles, also use a cloud-based syncing software such as iCloud, Google Drive or Dropbox, to keep your files automatically sync'd between multiple computers.
2. Lightweight backups
Backing up dotfiles is a clean and lightweight way to save the configuration of your environment. Of course you'll still have to backup your documents, but it's still a way more lightweight backup than backing up your entire filesystem (such as how Time Machine does backups in macOS). This also reduces backup time by a few seconds instead of waiting for hundreds of gigabytes to be copied over to your remote server or local backup hard drive.
You can configure a job to push your local dotfiles changes to remote hourly/daily/weekly, and if anything happens to your computer, you'll certainly have the latest configuration files for all your favorite programs.
3. Learn from the community's dotfiles
…and contribute back! By far, this is my favorite reason to organize and keep track of dotfiles. I learned so much from the community's dotfiles such as Felix's and Mathias' that they inspired me to publish my own. There are numerous hidden/undocumented configurations, bundled scripts and plugins that contribute significantly to increase one's productivity.
4. Version your configuration changes
I'm encouraging you to start your dotfiles repo today because this is one advice I wish I had received several years ago. Times goes by and you end up losing your favorite dotfiles if you don't track them consistently somewhere, and being able to track their changes over the course of years helps you visualize how much you've learned and grown.
I imagine looking at the changes on my dotfiles repo a few years from now and seeing how I switched certain softwares to others, started using a more productive text editor, added more programming languages to my toolbelt, refactored scripts using more modern techniques, and whatnot.
Conclusion
Now you may be convinced to start your own dotfiles repo, as you understand the whys. If you're still not convinced, let this list brought up by the community inspire you: https://dotfiles.github.io/inspiration/
If you're still wondering the how, check out my dotfiles repo: https://github.com/rogerluan/dotfiles. There, I documented how the scripts set up a macOS environment from scratch, and you can also see what Terminal configuration I use, as well as my list of essential programs.
If you already have your dotfiles repo, or if I inspired you to start your own, let me know on the comments below or via twitter @rogerluan_!