I had the same question when I started out in software development, but when you understand what git is, knowing the difference between the two is much easier. I’ve given a beginners introduction to git in another post, so check that out before or after glancing at the stuff below.
Need a TL;DR, ELI5? Here’s my best attempt :-
If git is a folder/archive of files, Github is a warehouse of filing cabinets holding these files.
Git is the technology/software you use to do the cool stuff mentioned in my other post (it’s a turbocharged save button that keeps a full history of your work, basically..). When you use git – you initialise it in whatever folder you want to save work in, which will turn that folder into a git repository, enabling you to track changes and give you an awesome, perfect history of your files as you work.
Github is simply a place to host your git repository (folder of stuff/code) online (like the Ruby on Rails source code here for example – https://github.com/rails/rails), and a convenient place to display your code for others to see. It’s a platform, or hub, created to host lots of repositories of people’s, and organizations code, and it also has tools to make collaboration on projects using git really easy. You may hear people talking about “pushing your code up” to Github – that’s what you do to publish your code from your (local) computer to the web – the basic command is
git push your-repo-name
There’s far more to learn about git and Github, but that’s beyond the scope of this short writeup If you’re thirsty for knowledge, I’ve written another post on Git Basics – Branching, Merging and pushing to Github
I hope this helps, and as usual – any comments or questions, please post them below or reach out via the contact form!