o‘zing o‘rgan
Git and GitHub Lesson 1 / 20
Pingvi

What Git is and why every developer needs it

Version control, a commit as a save point, Git versus GitHub

Chapter 1. Git basics 15 minutes 4 questions

A familiar situation: thesis.docx, thesis_new.docx, thesis_new_FINAL.docx, thesis_final_2.docx… Which is really the latest? What did you change yesterday? Developers solve this with a version control system. The most popular one is Git.

Git is a program that keeps every change in your project as history. Linus Torvalds (the author of the Linux kernel) wrote it in 2005 to manage work on Linux. Today almost every developer uses Git.

What Git gives you

Feature Meaning
History every change: who, when, and why
Going back made a mistake — return to the last working state
Branches try a new idea separately without breaking the main code
Teamwork dozens of people on one project without wiping each other's work

A commit is a "save point"

Think of a save point in a game: if you lose, you carry on from the last save. In Git that's a commit: a snapshot of the project at a moment, with a description.

●───────●───────●───────●
"Home     "Login   "Bug     "Profile
page"     form"    fixed"   page"

Git versus GitHub

Git GitHub
What a program (on your computer) a website (on the internet)
Job keeps the history stores and shares Git projects
Needs internet no yes
Analogy a camera a cloud photo album

There are other services like GitHub too: GitLab, Bitbucket. Git is underneath all of them.

Installing

  • Windows: "Git for Windows" from git-scm.com (it comes with the Git Bash terminal).
  • Linux (Ubuntu): sudo apt install git
  • macOS: run git --version in the terminal — it offers to install itself.

The first time, set your name and email (they're recorded in every commit):

git config --global user.name "Aziz Karimov"
git config --global user.email "aziz@example.com"

💡 Employers look at your GitHub profile — it's a developer's "living CV". That's why learning Git early pays off.

Check yourself

Question 1 / 4

What is Git?

Choices

Question 2 / 4

What is a commit?

Choices

Question 3 / 4

Git versus GitHub?

Choices

Question 4 / 4

Who created Git?

Choices