BM: Baca dalam Bahasa Melayu
World 4: Hello GitHub · Boss challenge
Publish the diary site
You will learn: to put your diary site on GitHub and keep it in sync with a teammate.
The problem
- def9487Add about page (only on your laptop)main (HEAD is here)
- ea2c020Add purple style (only on your laptop)
- f6c78e5Add home page (only on your laptop)
- 2efd0f2Add README (only on your laptop)
Your diary site is ready on your laptop. GitHub is still empty. Aisyah wants to help. Publish it, and stay in sync!
Watch
Five stages. Each one is a real terminal. Stuck? Try git status or git remote -v. Hints come after 2 tries.
Try it
Clear each stage to unlock the next.
Step 1 of 5: Connect to GitHub
Save https://github.com/you/diary.git as origin.
Hint
Read each stage’s note. Thengit status tells you where you stand.Check
A teammate pushed, so your push was rejected. What is the safe fix?
Pick one answer.
Try it
Optional: publish your real diary. Tick each step as you go.
Mission: your diary on GitHub
git remote add origin https://github.com/YOUR-USERNAME/diary.gitgit push -u origin main
0 of 4 steps done · Your ticks are saved.
Hint
Rejected? Your GitHub repo may have a README. Pull first, or make it again, empty.Check
Let’s check with GitHub. Type your username.
Check it on GitHub
- Your diary repo is publicNot checked yet
- It has 3 or more commitsNot checked yet
You did it!
You can now publish your project on GitHub and stay in sync.
Bahasa Melayu
Laman diari anda dah siap dalam laptop. GitHub masih kosong. Aisyah nak tolong. Terbitkannya, dan kekal selaras!
Lima peringkat. Setiap satu ialah terminal sebenar. Tersekat? Cuba git status atau git remote -v. Petunjuk muncul selepas 2 cubaan.
Selesaikan setiap peringkat untuk buka yang seterusnya.
git status beritahu kedudukan anda.Rakan sepasukan dah push, jadi push anda ditolak. Apa cara selamat membaikinya?
Pilihan: terbitkan diari sebenar anda. Tanda setiap langkah bila siap.
Jom semak dengan GitHub. Taip username anda.
Kini anda boleh terbitkan projek ke GitHub dan kekal selaras dengan pasukan.
You finished this before. Practice is always welcome!
Official docs: git remote · git push · git pull · Adding locally hosted code to GitHub
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?