What is version control and why is it your friend as a programmer? Often there is an entire development team working together on a project at the same time. Each person is tackling different portions of the code, making edits, adding features, and fixing bugs. Version control helps this process to run smoothly in two ways. First, it makes it easier to document all of these edits, fixes, and feature adds as they happen, and good documentation is every programmer's friend. But of equal importance is that it allows you to roll back your code to a previous working state should someone's edits or fixes actually break the code and crash the program. This gives the team time to resolve issues without requiring that a website, for example, go offline for an extended period of time.
Git is version control software that helps you track changes in your project. It provides handy tools to help you document the changes as you make them, and also provides you with save points, called commits, should any of those changes need to be undone. Documentation is pretty straight forward, and like all documentation, you get out of it what you put into it, so always be clear and concise about what you are doing. But what about those commits? If you have ever played video games you might be familiar with the idea of save points in a game. If you save early and often you can save yourself a lot of time and grief when you get obliterated by some boss character or discover you made some mistake early on that prevents you from completing the game by simply going back to a save point, instead of having to start the whole game over again. Commits work the same way. Should you make changes and discover that it breaks the program, you can simply revert to an earlier working version while you go back to debug your code.
Git is great tool, and GitHub makes it even better. Wait a minute, they're different things, you ask? Yes they are. Git lives on your computer and allows you to do version control right there, on the spot. But what if you are working with a team of four other developers - who live in four different states? GitHub makes it possible for you all to be working on the same project, remotely, while giving the entire team access to managing version control. An analogy might be that GitHub it to Git as the cloud is to your personal computer drive, but it's not really a cloud thing, so don't run too far with that analogy. It is, however, a remote repository, or repo, where a project and all of its code and documentation can live.
Even if you are working solo, GitHub can be useful the same way other internet based resources can be. You can travel, switch computers and still have access to your project. If your hard drive blows up, GitHub will still have everything you pushed there.