BM: Baca dalam Bahasa Melayu
World 1: Save Points
Read git status
You will learn: how to read git status, long and short.
The problem
Five files changed. Some are in the box. Some are not. Which ones will your next commit save?
Watch
git status sorts your changes into groups. Green lines are in the box. Red lines are not in the box yet.
Try it
Tap every green line: the files in the box.
Tap every line that is in the box.
0 of 2 found
Hint
Look under “Changes to be committed”.Watch
git status -s gives the short version. Each line starts with two letters. Left letter: the box. Right letter: your folder.
Try it
Find the untracked files: new files Git isn’t watching yet. They start with ??.
Tap every untracked line.
0 of 2 found
Hint
Look for two question marks at the start.Check
You run git add style.css. How does its short line change?
Pick one answer.
You did it!
You can now read git status, long and short.
Go deeper (optional)
Letters you will see: A added, M modified, D deleted, R renamed. MM: part is in the box, part is still in the folder. git status -sb adds your branch: A storyline of commits. Each branch has a name, like main. name on top.
Bahasa Melayu
Lima fail berubah. Ada yang dalam kotak. Ada yang tidak. Fail mana yang akan disimpan oleh commit (titik simpan) seterusnya?
git status susun perubahan anda ikut kumpulan. Baris hijau ada dalam kotak. Baris merah belum masuk kotak.
Tekan setiap baris hijau: fail yang ada dalam kotak.
git status -s beri versi pendek. Setiap baris bermula dengan dua huruf. Huruf kiri: kotak. Huruf kanan: folder anda.
Cari fail untracked (tidak dijejak): fail baru yang Git belum perhatikan. Ia bermula dengan ??.
Anda jalankan git add style.css. Macam mana baris pendeknya berubah?
Kini anda boleh baca git status, versi panjang dan pendek.
You finished this before. Practice is always welcome!
Official docs: git status
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?