Mamun Labs Learn
JourneyGlossary
esc
  • Try “map”, “flexbox” or “state”.
Log in
Start learning
Phase 0 · 5 / 6Git and GitHub basics
Phase 0Getting started
6 topics · 1–2 wks
  1. 1What a computer actually does
  2. 2Files, folders and paths
  3. 3The terminal, step by step
  4. 4Set up VS Code and Node
  5. 5Git and GitHub basics
  6. 6Using AI as a study partner
JourneyPhase 0Git and GitHub basics
01 / 08Overview

Git and GitHub basics

You'll learn to save versions of your project with Git, read git status, and put your code on GitHub.

Why it mattersGit lets you undo mistakes and see what changed. Every developer team, and every job, uses it.
about 90 min·needs: The terminal, step by step, Set up VS Code and Node
02 / 08

Watch & read

Start with the required ones. The others are there when you need them.

Video
Git and GitHub crash course 2025Traversy Media · YouTube · 30 min · English
MMamun's noteWatch 0:00 to 29:30, up to "GitHub interface basics". Skip SSH keys, branching and pull requests for now. They come later.
VideoOptional
Crash course: সহজ বাংলায় Git and GitHubLearn with Sumit · YouTube · 36 min · Bangla
MMamun's noteThe same ideas in Bangla. Watch 0:00 to 36:12, up to branching. Stop there for now.
Docs
Pro Git: recording changes to the repositoryPro Git book (free) · 20 min · English
MMamun's noteRead up to "Ignoring files". It explains git status and staging slowly, with the same output you will see.
DocsOptional
Adding locally hosted code to GitHubGitHub Docs · English
MMamun's noteUse this when you push your first repo. Follow the steps for the command line.
03 / 08

Explanation

You change your code, it breaks, and you cannot remember what it looked like when it worked. Or your laptop dies before submission. Git solves the first problem. GitHub solves the second.

Think of Git as taking photos of your project folder. Each photo is a commit: a saved version with a short note saying what changed. You can look back at any old photo. A folder that Git is watching is called a repository (repo for short). GitHub is a website that keeps a copy of your repo online, like Google Drive for code.

Taking a photo has two steps. First you choose which changes go in the photo, called staging, with git add. Then you take it with git commit.

git init start watching this folder (once)
git status what changed? what is staged?
git add hello.js put this change in the next photo
git commit -m "Add greeting" take the photo, with a message
git log --oneline list the photos so far

To put your repo on GitHub, make an empty repo on github.com, then copy the two or three commands it shows you (git remote add origin … and git push -u origin main). After that, git push sends your new commits up.

A good commit message says what the change does, in a few words: Add login button, Fix total when cart is empty. A message like update or asdf tells future you nothing.

People often edit a file and run git commit straight away. Git replies "no changes added to commit". You forgot git add. Git only saves what you staged, so you can choose what goes in each photo.

Run git status all the time. Read it top to bottom: "Changes to be committed" (green) are staged and will be in the next commit. "Changes not staged" (red) are edited but not added yet. "Untracked files" are new files Git is not watching yet.

Words to recognise
GitGitHubrepositorycommitstagegit statusgit addgit commitgit logpushremote
04 / 08

Code tour

Click a line number with a ring to read the note for that line.

terminal6 notes
1$ git status
On branch main
Mentor note · line 2
You are on the main branch. For now you will always be on main.
Changes to be committed:
4 modified: hello.js
5
Changes not staged for commit:
7 modified: index.html
8
Untracked files:
10 notes.txt
11
$ git commit -m "Greet the user by name"
13$ git log --oneline
3f2a9c1 Greet the user by name
05 / 08

Quick check

3 questions. Each one explains itself after you answer.

  1. 1 / 3You edited hello.js and ran git commit -m "Fix name". Git says no changes added to commit. Why?
  2. 2 / 3In git status, a file is under "Changes not staged for commit". What does that mean?
  3. 3 / 3Which commit message is most useful?
06 / 08

Explain it back

Only you can see this. Log in to keep it.0 words
07 / 08

How confident are you with Git and GitHub basics?

08 / 08

Done

You can now
Start a Git project, make a commit with a clear message, read what git status is telling you, and push your work to GitHub.
Next: Using AI as a study partner Back to Phase 0
On this page
  1. 01Git and GitHub basics
  2. 02Watch & read
  3. 03Explanation
  4. 04Code tour
  5. 05Quick check
  6. 06Explain it back
  7. 07Confidence
  8. 08Done
Up next · 02 / 08Watch & read
Mamun Labs LearnFound a mistake on this page? Tell Mamun.
Mamun Labs Learn
JourneyGlossary
esc
  • Try “map”, “flexbox” or “state”.
Log in
Start learning
Log in to save your progress. Everything here works without an account.Log in to save progressLog in
Phase 0Getting started
6 topics · 1–2 wks
  1. 1What a computer actually does
  2. 2Files, folders and paths
  3. 3The terminal, step by step
  4. 4Set up VS Code and Node
  5. 5Git and GitHub basics
  6. 6Using AI as a study partner
JourneyPhase 0Git and GitHub basics
01 / 08Overview

Git and GitHub basics

You'll learn to save versions of your project with Git, read git status, and put your code on GitHub.

Why it mattersGit lets you undo mistakes and see what changed. Every developer team, and every job, uses it.
about 90 min·needs: The terminal, step by step, Set up VS Code and Node
02 / 08

Watch & read

Start with the required ones. The others are there when you need them.

Video
Git and GitHub crash course 2025Traversy Media · YouTube · 30 min · English
MMamun's noteWatch 0:00 to 29:30, up to "GitHub interface basics". Skip SSH keys, branching and pull requests for now. They come later.
VideoOptional
Crash course: সহজ বাংলায় Git and GitHubLearn with Sumit · YouTube · 36 min · Bangla
MMamun's noteThe same ideas in Bangla. Watch 0:00 to 36:12, up to branching. Stop there for now.
Docs
Pro Git: recording changes to the repositoryPro Git book (free) · 20 min · English
MMamun's noteRead up to "Ignoring files". It explains git status and staging slowly, with the same output you will see.
DocsOptional
Adding locally hosted code to GitHubGitHub Docs · English
MMamun's noteUse this when you push your first repo. Follow the steps for the command line.
03 / 08

Explanation

You change your code, it breaks, and you cannot remember what it looked like when it worked. Or your laptop dies before submission. Git solves the first problem. GitHub solves the second.

Think of Git as taking photos of your project folder. Each photo is a commit: a saved version with a short note saying what changed. You can look back at any old photo. A folder that Git is watching is called a repository (repo for short). GitHub is a website that keeps a copy of your repo online, like Google Drive for code.

Taking a photo has two steps. First you choose which changes go in the photo, called staging, with git add. Then you take it with git commit.

git init start watching this folder (once)
git status what changed? what is staged?
git add hello.js put this change in the next photo
git commit -m "Add greeting" take the photo, with a message
git log --oneline list the photos so far

To put your repo on GitHub, make an empty repo on github.com, then copy the two or three commands it shows you (git remote add origin … and git push -u origin main). After that, git push sends your new commits up.

A good commit message says what the change does, in a few words: Add login button, Fix total when cart is empty. A message like update or asdf tells future you nothing.

People often edit a file and run git commit straight away. Git replies "no changes added to commit". You forgot git add. Git only saves what you staged, so you can choose what goes in each photo.

Run git status all the time. Read it top to bottom: "Changes to be committed" (green) are staged and will be in the next commit. "Changes not staged" (red) are edited but not added yet. "Untracked files" are new files Git is not watching yet.

Words to recognise
GitGitHubrepositorycommitstagegit statusgit addgit commitgit logpushremote
04 / 08

Code tour

Click a line number with a ring to read the note for that line.

terminal6 notes
1$ git status
On branch main
Mentor note · line 2
You are on the main branch. For now you will always be on main.
Changes to be committed:
4 modified: hello.js
5
Changes not staged for commit:
7 modified: index.html
8
Untracked files:
10 notes.txt
11
$ git commit -m "Greet the user by name"
13$ git log --oneline
3f2a9c1 Greet the user by name
05 / 08

Quick check

3 questions. Each one explains itself after you answer.

  1. 1 / 3You edited hello.js and ran git commit -m "Fix name". Git says no changes added to commit. Why?
  2. 2 / 3In git status, a file is under "Changes not staged for commit". What does that mean?
  3. 3 / 3Which commit message is most useful?
06 / 08

Explain it back

Only you can see this. Log in to keep it.0 words
07 / 08

How confident are you with Git and GitHub basics?

08 / 08

Done

You can now
Start a Git project, make a commit with a clear message, read what git status is telling you, and push your work to GitHub.
Next: Using AI as a study partner Back to Phase 0
On this page
  1. 01Git and GitHub basics
  2. 02Watch & read
  3. 03Explanation
  4. 04Code tour
  5. 05Quick check
  6. 06Explain it back
  7. 07Confidence
  8. 08Done
Up next · 02 / 08Watch & read

You change your code, it breaks, and you cannot remember what it looked like when it worked. Or your laptop dies before submission. Git solves the first problem. GitHub solves the second.

Think of Git as taking photos of your project folder. Each photo is a commit: a saved version with a short note saying what changed. You can look back at any old photo. A folder that Git is watching is called a repository (repo for short). GitHub is a website that keeps a copy of your repo online, like Google Drive for code.

Taking a photo has two steps. First you choose which changes go in the photo, called staging, with git add. Then you take it with git commit.

git init start watching this folder (once)
git status what changed? what is staged?
git add hello.js put this change in the next photo
git commit -m "Add greeting" take the photo, with a message
git log --oneline list the photos so far

To put your repo on GitHub, make an empty repo on github.com, then copy the two or three commands it shows you (git remote add origin … and git push -u origin main). After that, git push sends your new commits up.

A good commit message says what the change does, in a few words: Add login button, Fix total when cart is empty. A message like update or asdf tells future you nothing.

People often edit a file and run git commit straight away. Git replies "no changes added to commit". You forgot git add. Git only saves what you staged, so you can choose what goes in each photo.

Run git status all the time. Read it top to bottom: "Changes to be committed" (green) are staged and will be in the next commit. "Changes not staged" (red) are edited but not added yet. "Untracked files" are new files Git is not watching yet.

Words to recognise
GitGitHubrepositorycommitstagegit statusgit addgit commitgit logpushremote

You change your code, it breaks, and you cannot remember what it looked like when it worked. Or your laptop dies before submission. Git solves the first problem. GitHub solves the second.

Think of Git as taking photos of your project folder. Each photo is a commit: a saved version with a short note saying what changed. You can look back at any old photo. A folder that Git is watching is called a repository (repo for short). GitHub is a website that keeps a copy of your repo online, like Google Drive for code.

Taking a photo has two steps. First you choose which changes go in the photo, called staging, with git add. Then you take it with git commit.

git init start watching this folder (once)
git status what changed? what is staged?
git add hello.js put this change in the next photo
git commit -m "Add greeting" take the photo, with a message
git log --oneline list the photos so far

To put your repo on GitHub, make an empty repo on github.com, then copy the two or three commands it shows you (git remote add origin … and git push -u origin main). After that, git push sends your new commits up.

A good commit message says what the change does, in a few words: Add login button, Fix total when cart is empty. A message like update or asdf tells future you nothing.

People often edit a file and run git commit straight away. Git replies "no changes added to commit". You forgot git add. Git only saves what you staged, so you can choose what goes in each photo.

Run git status all the time. Read it top to bottom: "Changes to be committed" (green) are staged and will be in the next commit. "Changes not staged" (red) are edited but not added yet. "Untracked files" are new files Git is not watching yet.

Words to recognise
GitGitHubrepositorycommitstagegit statusgit addgit commitgit logpushremote