If you’re a developer, your dotfiles are some of the most important files on your computer. You’ve built them up over years to solve precisely the problems you have in precisely the ways you want to solve them.
At least on my computer I have a ton of them: .zshrc, .gitconfig, .vimrc, aws configs, etc. I’m willing to bet if you’re a software developer you have quite a few yourself.
Do you have yours backed up? Hopefully your answer is yes but probably your answer is no. If you’re in the “no” category, consider using a tool like Hoard to start doing that, because it’s a PITA if your computer bites and you suddenly lose them.
What is Hoard?
Hoard has 2 main functions:
- Collect dotfiles that are on your computer into a git repository.
- Distribute dotfiles that are in your git repository to your computer.
The files it collects and where it distributes them to is all controlled by a…you guessed it…dotfile: .hoardconfig
Collect
1
➜ ~ hoard collect
Copies all of your dotfiles in your config to your repo, commits the changes and pushes to remote. Pretty easy! All of your dotfiles are backed up.
Distribute
1
➜ ~ hoard distribute
Pulls from remote of your repo, distributes those files on your system.
Wait…I thought this was all about backing up dotfiles. Why do we care about distributing them onto your computer?
There are a couple reasons for that. The first one is that you may need to get a new computer at some point, and this can do it for you!
The second is if you work on multiple machines. There are dotfiles that are specific to a machine, for example things for work. But there are also a lot of dotfiles that you would use on multiple machines. Keeping these in sync with each other manually is a pretty big pain, so using a git repository to keep these in sync is pretty useful (Read this section on the README to learn more about managing dotfiles on multiple computers).
Why Hoard?
Hoard is a pretty simple and predictable tool with a small, readable codebase. It’s not the only dotfile manager on the internet though, so look around and see what fits your workflow the best!
View on Github