A Git-y Blog
Attempts At Explaining The Newly Learned
Saturday, May 23, 2015
This week probably wouldn't have been my first taste of git/GitHub if someone had told me long ago that using them made working on a project like a video game where you get infinite continues and save slots. "Version control" may sound a bit less exciting, but I assure you, it's the same thing. Once you have your files or project set up to be tracked in git, any changes you make (and later commit) will be noted and act like a save point. Next set of changes, new save point on a separate save file! Let’s say you’re now a week into your project and you realize something went horribly wrong at some point, but you have already committed so many changes in the past week that you don’t know when exactly it happened. No need to fear! Since you were wise enough to use version control, you can go back and read all of the crystal clear messages you wrote yourself each time you committed changes to your project. Even if you can’t discern what went wrong from your detailed messages, you can still go back to any one of those points in your project timeline until you find the point at which things went awry. Why use version control? I’d say take the relatively small amount of time involved in learning to use it and then ask yourself why you wouldn’t use it. I’m willing to bet that the minor time investment now will be well worth it at some point in the future.
Super excited to get your version control on, now? I bet! Now git to it (I’ll show myself out, as soon as I’m done). Once you have decided on the directory for your project and let git know you would like to use its version control magic on it, the hard part is done. As you work on the files that make up your project, git will keep track of them and make note of any that have changed since your last commit (save point). Once you have come to a stopping point in your work (end of a time block, one aspect or feature completed) you can run a simple terminal command ‘git status’ in your git-tracked directory and voila! Look at all of those changes you made! Any time you make even the slightest change to a file in a git-tracked directory, or add new files, git will know and want you to either commit or discard those changes. The more often you commit, the more saves you have to go back to!
Now, there is one thing I mentioned, but haven’t really talked about, that makes all of this even more useful. I know, what could be more useful than having a near infinite number of points in history to go back to should something go wrong, right? Well let me tell you. Having yet another level of back-up and the ability to easily get feedback from and collaborate with people from all over the world! Welcome to GitHub. It takes your local version control and opens up the giant double doors of opportunity for it. When you begin connecting your local repository to GitHub, not only do all of your files and commits get a second home, but should you choose to, you can share any of your files with others! They can then change, add to, comment on, or even completely recreate your project in ways you hadn't considered! You can go from just you and your mind working on a project to the near infinite possibilities and resources of the world’s netizens giving you inspiration and support.
tl;dr: There really is little reason NOT to use version control, it's amazing and can save you all kinds of time. Expanding that to GitHub just increases the possibilities. Thanks for reading!