was once so anti-GitHub that I refused to even visit the website. I felt that the projects I had worked on in my spare time weren’t ‘GitHub-worthy’ and were best kept locally on my Mac.
Big mistake. HUGE.
I hadn’t fully understood the necessity of pushing my work to GitHub until I began to work on my Command Line Tutorials. So, why should you push your work to GitHub?
Ease of Sharing
Do people still carry around external hard drives? I’m sure that some people do, however, it’s not necessarily something that most people have on hand. But you know what’s always there? The internet. And more important GitHub.com.
Let’s say you want to show someone at a meetup your latest project. Sure, you have your laptop, however, what if the individual wanted to modify your code – on THEIR laptop? That’s where GitHub comes into play. Assuming you’ve created a repository (contains your project files) on GitHub (and your repository is open to the public), anyone can access your project files and create a copy locally (aka on their laptop).
To date, I haven’t come across a programmer who writes code once and considers it a masterpiece with no changes. With GitHub (and more importantly Git), you can keep track of different versions of your code. Of course, this requires some due diligence on your part to create branches (versions of your code). But as a whole, you can keep track of how your code has been modified throughout its life cycle.
What if you want to work with others on a project? It could become cumbersome to attach your project files to email and send to the project team each time a change is made. Now imagine each person on your project team doing that same process. That could become a lot and just screams unorganized chaos.
With GitHub, everyone can access the project files in addition to the latest version (assuming the repository owner has committed the changes). GitHub also enables your project team to submit updates for approval via a pull request. Therefore, there are some internal controls available to help keep your project in order.
Ever faced a blue (or black) screen of death? Even worse, taking your computer in for maintenance only to be told that your hard drive couldn’t be recovered. Sucks, doesn’t it? If you pushed your project files to GitHub, your loss of hard drive shouldn’t stop the party (aside from the fact that you pretty much lost everything else).
Having an external hard drive in your possession could also help, however, why not just store everything on the cloud?
There’s so many more benefits to using GitHub. However, if you’re brand new to the concept, consider taking Codecademy’s course on Git or reading their article on Getting Started with Git and GitHub. And once you’re ready to move forward, head over to the official GitHub website to get started!