BM: Baca dalam Bahasa Melayu
World 4: Hello GitHub
Clone a project
You will learn: how to copy a whole project from GitHub to your computer.
The problem
Your laptop broke. The new one is empty. Luckily, your diary is safe on GitHub. How do you get it back?
Pick one answer.
Watch
clone: Copy a whole project to your computer. copies the whole project: every file and every commit. It even saves the address as origin for you.
Try it
Clone your diary onto the new laptop. Then step into its folder.
Hint
Clone first. Thencd diary.Predict
You just cloned. Which remotes does the new repo have?
Pick one answer.
Check
Tap every line about GitHub's copy.
0 of 2 found
Check
What comes with a clone? Sort each one.
Drag a card into a box. Or tap the card, then tap the box.
You did it!
You can now clone any project from GitHub.
Go deeper (optional)
git clone <url> my-diary picks the folder name. With an SSH key, clone the SSH address instead. Cloning someone else’s public repo works too. To change it, you’ll need a fork (lesson 12).
Bahasa Melayu
Laptop anda rosak. Yang baru masih kosong. Nasib baik diari anda selamat di GitHub. Macam mana nak dapatkan semula?
Clone (salin) menyalin seluruh projek: setiap fail dan setiap commit. Ia juga simpan alamat itu sebagai origin untuk anda.
Clone diari anda ke laptop baru. Kemudian masuk ke foldernya.
cd diary.Anda baru clone. Remote apa yang repo baru itu ada?
Apa yang datang bersama clone? Asingkan setiap satu.
Kini anda boleh clone apa-apa projek dari GitHub.
You finished this before. Practice is always welcome!
Official docs: git clone · Cloning a repository
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?