Lesson 02 of 10Concept
Git vs GitHub
Goal: Tell the difference between Git, the tool, and GitHub, a place to host Git repositories.
Two different things with similar names
Git is a program that runs on your computer and tracks the history of a folder.
GitHub is a website owned by a company. It stores copies of Git repositories online, and adds tools for working with other people: pull requests, code review, issues and more.
Git
- A command-line tool you install
- Works offline, on your own machine
- Records history in a local
.gitfolder - Free and open source, created in 2005
GitHub
- A website and hosting service
- Needs an internet connection and an account
- Stores a copy of your repository on its servers
- One of several hosts, alongside GitLab and Bitbucket
How they fit together
Your computer GitHub Teammate's computer ┌──────────────┐ push ┌──────────────┐ pull ┌──────────────┐ │ repository │ ──────────▶ │ repository │ ──────────▶ │ repository │ │ (.git) │ ◀────────── │ (remote) │ ◀────────── │ (.git) │ └──────────────┘ pull └──────────────┘ push └──────────────┘
You can use Git without GitHub
Git works perfectly well on its own. Many people use it only on their laptop to keep a history of their work. Hosting services come in when you want a backup online or want to collaborate.
Everything in this course is about Git itself, so it works the same whichever host you pick later.
