Fork repository instructor dan clone ke komputer sendiri.
Repository: github.com/opariffazman/bootcamp-devops
-
Navigate to repository:
- Open browser β
https://github.com/opariffazman/bootcamp-devops
- Open browser β
-
Fork repository:
- Click "Fork" button (top right, beside Star)
- Pastikan "Copy the main branch only" is checked
- Click "Create fork"
-
Wait for fork:
- GitHub akan buat copy ke account anda
- URL akan jadi:
github.com/[your-username]/bootcamp-devops
β Success: Anda akan nampak banner "forked from opariffazman/bootcamp-devops"
-
Get SSH URL dari fork fork:
- Di YOUR forked repo page
- Click "Code" button (hijau)
- Pilih "SSH" tab
- Copy URL (format:
[email protected]:your-username/bootcamp-devops.git)
-
Open terminal dan navigate ke folder kerja:
mkdir devops-labs
cd devops-labs- Clone repository:
git clone [email protected]:[your-username]/bootcamp-devops.gitGantikan [your-username] dengan username GitHub anda!
- Masuk ke dalam folder dan verify git:
# Masuk directory
cd bootcamp-devops
# check url
git remote -vExpected output untuk git remote -v:
origin [email protected]:your-username/bootcamp-devops.git (fetch)
origin [email protected]:your-username/bootcamp-devops.git (push)
Upstream adalah link ke original repository (instructor punya).
git remote add upstream [email protected]:opariffazman/bootcamp-devops.gitVerify:
git remote -vExpected output:
origin [email protected]:your-username/bootcamp-devops.git (fetch)
origin [email protected]:your-username/bootcamp-devops.git (push)
upstream [email protected]:opariffazman/bootcamp-devops.git (fetch)
upstream [email protected]:opariffazman/bootcamp-devops.git (push)
Penjelasan:
- origin = your fork (anda boleh push)
- upstream = original repo (anda tak boleh push, hanya fetch)
- Repository forked successfully
- Fork cloned to local computer
- Inside
bootcamp-devopsdirectory -
originremote pointing to YOUR fork -
upstreamremote pointing to original repo - Can see repository files