Like most things I don’t understand, I was really intimidated by Github, this public arena to show off your code. I always assumed that git and Github were related. This week I got a crash course on git and Github 101 and now I’m forking repos, creating and merging branches like a boss. So what is the difference between git and GitHub?

git != Github

git lives locally on your computer while GitHub is an online platform where you can share your repositories and updated code pushes with other people. It keeps a working version of your code that you can share publicly with others.

There’s 2 main reasons why Github is so powerful:

  • Version control - version control means keeping track of all of your changes to a specific file, project, etc. through making copies of said file throughout each change. Github is a nice place to keep all of those versions in one place, where you or others can access all of the past and current version. Developers use version control to hedge against mistakes and lost work. If a mistake is made, they can go back to a bug free, working version of their code. It saves time and money and makes perfect sense to me. I wish I had started using version control for my own work. I’ve written over my email code by accident many times before. And as far as version control, I was saving different files locally on my computer, and its a mess to sort through.

  • Branching - branching allows you to create clones of your files that you can work on independent of each other. Once you’re satisfied with a piece of your code, you can then merge it back to the main or “master” branch. This allows for many people to work on the same project without having to coordinate with each other or step on each other’s toes.