Recently I had a conversation with someone who was shocked to learn I use Git for everything. "What? Even projects where you're working alone? Why on earth would you do something like that?!" As alarmed as they were that I use Git for solo projects, I was just as surprised to hear that they didn't and suddenly found myself feeling very self-conscious and questioning my choices. Is it weird to use version control for solo projects? And why do it at all? Some introspection and asking around on Twitter revealed the answers I was looking for: Not only is it not weird, there are lots of great reasons to use version control for your solo projects.
Sync and Backup
One of the most obvious reasons for committing your projects to version control—be that Git, Mercurial, or even SVN or CVS—is to have a safe backup of your work. If you use a service like GitLab or GitHub, or if you host your own using something like Gitea, you can even get virtually free offsite backups. This is useful on its own, but becomes invaluable when you work from multiple places. Start your project at your desktop computer or workstation, commit and push it to an offsite repository, then clone that to your laptop or tablet to continue your work while on the move. You can even edit, commit, and push changes from your phone! This can offer a lot of flexibility as well as the peace of mind that comes from knowing your work is backed up.
I'm not sure about you, but I'm not perfect. Mistakes creep into my work all the time, and sometimes they're big but sneaky so they're not noticed until well after the fact. Other times, I want to test something out without risking the work that I've already done. Using version control provides the perfect safety net for these situations. Using a "commit early, commit often" philosophy, it's a lot easier to backtrack to a version of the project before that big, sneaky mistake crept in. Branches allow for a safe space to experiment, where big, sneaky mistakes are welcome to come and play without risking instability in the rest of the work.
Have you ever found yourself needing to search your home directory or even your whole disk drive because you're positive that you wrote a certain thing at some point but simply can't for the life of you locate it? It's really frustrating, isn't it? That sort of thing can consume your morning as you try various permutations of the find and grep commands in hope of turning up what you're looking for. This used to happen to me all the time until I started putting everything into version control. Now I always know where to find my work; it's right there in GitLab where I put it, safe and sound. Using a service like GitLab or GitHub also gives you powerful search functionality, for those times when just browsing a list of repositories isn't enough to find what you need.
Ease of Reuse
Now that I can easily find past work, it's much easier to repurpose it. Snippets from previous projects frequently find their way into new work, saving me a lot of time and energy. Some of the most reused items are ones I rarely see but rely on daily: my configuration files. Do you have your Vim, Emacs, VS Code, bash prompt or other tools dialed in to just where you want them? By committing the configuration files for those apps to version control, you'll never have to rebuild your config again. This can be especially helpful when you switch jobs or get a new computer. Setup becomes much less of a headache.
Although it’s not specifically a version control thing, having an issue tracker associated with each of my solo projects is proving priceless. Think of something I want to add? Open an issue. Find a problem I don't have time to deal with now? Open an issue. Working on a larger project and need breadcrumbs to help lead me toward completion? Break the problem into smaller pieces and open an issue for each one. Having an issue tracker also helps when I need to set the work down to do something else. A quick note in the issue reminds future me what today me was thinking and working on, so it's easier to pick up where I left off.
No Project Is Ever Really Solo
This leads to the final and most important reason to use version control for your solo projects: You're never really working alone. While, yes, having the project in version control can make it easier to share that work with other people, it's the other _yous_ who benefit most. Today You is working with Past You to prepare for Future You to finish things off. With all of the benefits listed here, you had better believe that Future You very much wants Today You to start using version control for all of your projects, solo or otherwise.