Why You Should Use Git For Personal Projects

Chris Mimm
4 min readAug 13, 2019

--

Photo by Tim Gouw on Unsplash

I’ve read a few “Git is overrated” articles and forum posts recently. Usually, these are centred around the idea that Git is just too complicated for smaller tasks, like using a jackhammer for putting a nail into the wall. If you’ve reached that conclusion, I’d argue you’re not using it right, and here’s why.

You Don’t Need to Use All of It

Yes, there exists a Git manual with 441 pages and yes, you can manage incredibly complex codebases using all of its tools, but in reality you only need to remember these three lines after some initial set-up:

git add -a
git commit -m "Hello World"
git push

If you’re already using cloud storage for your project, typing these three lines instead is arguably even faster than dragging and dropping your files each time you create an updated version. If your code is only stored locally, let this serve as a reminder that PCs have the remarkable habit of dying at the most inconvenient of times.

You might argue that those three lines are only sufficient until something goes wrong, at which point you’ll spend hours trawling through the internet for a fix. This is true, but at the same time you’re highly unlikely to encounter any complex issues unless you try to do something complex in the first place. Forget about feature branches, cherry-picking and reverting commits for now. If you introduce a bug accidentally, fix it manually and commit the fix rather than messing around on the command line. KISS.

Version Control

This seems like an obvious point to make, but I want to talk about a more subtle advantage of it. Sometimes, I find myself wanting to prototype a feature on my website. And sometimes, that prototype feature can be rather messy. Then I decide I don’t like that feature after all, and I want to get rid of it.

Without Git, I have to root through my files and manually remove the lines of code I added, possibly introducing nasty bugs because I’m forgetful and I was probably concentrating more on my favourite Netflix series while writing it in the first place. With Git, I type git reset --hard and I’m back on a clean copy at the point of my last commit (as a tip, commit often for this very reason). Happy days.

People Trust GitHub/GitLab/Bitbucket

If your project is intended to be some sort of library or open-source tool, you’ll be much more likely to have people trust your code if it’s published on a reputable Git hosting site. As a population, we’ve been conditioned to distrust random files downloaded over the internet due to viruses and malicious software, and your code snippet shared via a link to Google Drive won’t inspire trust in those less familiar with finding and using open-source software responsibly.

Side note: if you’re just wanting to demonstrate a concept or algorithm in JavaScript and you really don’t want to use Git, you’re still better off using JSFiddle (or similar) and allowing people to view it online rather than having to download it first.

Industry Experience

Love it or hate it, Git will feature in your career as a software developer at some point. Having a basic understanding of VCS (Version Control Systems) will give you that necessary boost for your CV in an increasingly competitive job environment. Even if you only know the three lines I showed you above, you won’t have to look completely dumbstruck in an interview when you’re asked about your thoughts on - and experiences with - version control.

If you’re feeling especially keen, you could even host your CV online (for free) in a Git repository, using something like GitHub Pages. That’ll show ‘em.

The Greater Good

Finally, I wanted to address one of the most fundamental aspects of software engineering (in my opinion) by referring you to the creator of Git, Linus Torvalds. That name might ring a bell, because he’s also the creator of the Linux kernel. It just so happens that the Linux kernel is open source, and without it we wouldn’t have Android, Ubuntu or most of the known web.

Your idea or project might not be on the same scale as Linux, but by making it open source and publishing it, you allow everyone to benefit from your work. Even without realising it, software developers use hundreds of open source libraries and tools on a daily basis, and it’s easy to forget to give back to the community when you have the chance. Your project might seem like a throwaway to you, but to others it might save a day’s worth of problem solving.

Word of Warning

I’ve listed some of the reasons why I choose to use Git + GitHub for just about all code-related endeavours, but there are situations when I would suggest you actively avoid it. For example, if your personal project includes private access credentials for something and you’re completely unfamiliar with .gitignore , I’d avoid placing it on GitHub (or anywhere online, for that matter) until you understand how it works. You can read more about it here.

Summary

I realise that this article has gone off on a wild tangent, discussing the benefits of Git hosting sites possibly more so than Git itself, but these days they go pretty much hand-in-hand.

You don’t have to become a Git pro overnight, and you may find that you prefer using a different VCS tool; I only mentioned Git in this article because it’s the most popular one, but there’s a few you can choose from. Whatever you do, remember that using these tools, even in a conservative way, can — and will — save you a lot of hassle in the future. And that’s obviously the stone-cold truth, because some random guy on the internet says it is.

Happy coding!

--

--