Treat dotfiles as code

As a developer, i have spent lot of time in making my configuration suitable for my me. I would hate to lose all those effort when i lose it. Create a repository on github (or any git hosting solution) and store it there.

My dotfiles are at

Write a Makefile

Write a Makefile so that you can install specific configuration. For example i use make emacs to install my emacs configuration.

This way you can quickly move to a new computer

Private Configs and Secrets

    Obviously you cannot store them in public repository. My thoughts on this is
  1. Use a Private Repository
  2. This prevents you checking in private configs accidentally making it public and visible to everyone.
  3. Encrypt the secrets
  4. Keeping the private info plain text is not secure. It will be secure when you encrypt it at rest. git-crypt is an excellent tool for that.
  5. Sign your commits
  6. To find out any tampering of files, it is best to sign the commit, so that you can be comfortable knowing that no one has tampered with the git repo itself as it is hosted on some platform.