Git & GitHub Course
Git & GitHub
/
Beginner

Git vs GitHub

Definition

Git is the version control software running locally on your computer. GitHub is a cloud-based hosting service that lets you manage Git repositories online.

Explain Like I'm New

Git is the engine inside your car. GitHub is a public parking garage. You don't need the parking garage to drive your car, but it's really useful if you want to show your car to other people or let them drive it.

Real World Example

You write code on your laptop using Git. When you want to share it with your coworker across the world, you push it to GitHub. Your coworker then downloads it from GitHub.

Common Use Cases

  • •Open source hosting
  • •Team collaboration
  • •Code portfolios

Terminal Output

bash / terminal
/* Local Machine (Git) ------------------- 1. Write code 2. `git commit` (Saves code LOCALLY) ↓ (Internet Connection Required) The Cloud (GitHub/GitLab/Bitbucket) ----------------------------------- 3. `git push` (Uploads local saves to the internet) 4. Other developers can now see and download it! */

Interview Questions

basic

  • Do you need an internet connection to use Git?

intermediate

  • Is GitHub the only cloud service for Git?

Flash Cards

Question

Need internet for Git?

Click to reveal answer
Answer

No! Git runs entirely locally on your hard drive. You only need the internet when you want to push your code to a cloud service like GitHub.

Question

Is GitHub the only one?

Click to reveal answer
Answer

No. GitHub is the most popular, but there are major competitors like GitLab and Bitbucket that do the exact same thing.