BM: Baca dalam Bahasa Melayu
World 1: Save Points · Boss challenge
Diary site: 5 clean commits
You will learn: to build a diary site, one clean commit at a time.
The problem
Your diary site is ready. Four real files and one junk log. Can you save it as five clean commits?
Watch
Here is the plan: one change per commit. Each message is short and starts with an action word.
Try it
Build the site in five stages. Every message must be clean. Made a mistake? Press “Start again”.
Step 1 of 5: Start the repo
Make the diary a repo. Then commit README.md.
Hint
Stuck? Rungit status. It tells you what is left to save.Check
Why did style.css and the link in index.html share one commit?
Pick one answer.
Try it
Optional: build it again on your own computer. Same plan, real Git.
Real mission
mkdir diary-sitecd diary-sitegit initgit add README.mdgit commit -m "Add README"echo "*.log" > .gitignoregit log --oneline
0 of 8 steps done · Your ticks are saved.
Check
Paste your real git log --oneline below. The check runs on this page only. Nothing is sent anywhere.
You did it!
You can now build a project with small, clean commits.
Bahasa Melayu
Laman diari anda dah siap. Empat fail sebenar dan satu log sampah. Boleh anda simpan sebagai lima commit (titik simpan) yang kemas?
Ini rancangannya: satu perubahan bagi setiap commit. Setiap mesej pendek dan bermula dengan kata kerja.
Bina laman ini dalam lima peringkat. Setiap mesej mesti kemas. Tersilap? Tekan “Mula semula”.
git status. Ia beritahu apa yang belum disimpan.Kenapa style.css dan pautan dalam index.html berkongsi satu commit?
Pilihan: bina sekali lagi dalam komputer anda sendiri. Rancangan sama, Git sebenar.
Tampal git log --oneline sebenar anda di bawah. Semakan berlaku dalam halaman ini sahaja. Tiada apa-apa yang dihantar.
Kini anda boleh bina projek dengan commit yang kecil dan kemas.
You finished this before. Practice is always welcome!
Official docs: git commit · git log · gitignore
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?