sreenivas./courses
Git & GitHub for Beginners — all lessons

$ git add notes.txt

→ staged ✓

MODULE 01 · 4 MIN READ

git add — stage the shot

git bash

$ git add notes.txt

$ git status

Changes to be committed:

new file: notes.txt

Run git status again and watch the file move zones — red to green. Same colors as the diagram. The file is now standing in the photo studio, waiting for the shutter.

Why the extra step?

Because sometimes you've changed five files but only want three in this snapshot. The staging area lets you compose the shot instead of photographing your whole messy desk every time.

Stage everything at once

git add . stages every changed file in the folder. Perfectly fine when you genuinely want everything in the photo — which, as a beginner, is most of the time.

practice terminal — you cannot break it

a tiny simulated laptop. six commands, zero consequences.

$ 

// stage your file with: git add notes.txt