Skip to content

Latest commit

Β 

History

History
110 lines (74 loc) Β· 2.4 KB

File metadata and controls

110 lines (74 loc) Β· 2.4 KB

LAB 2: FORK & CLONE REPOSITORY

🎯 Objektif

Fork repository instructor dan clone ke komputer sendiri.

πŸ“‹ Repository Info

Repository: github.com/opariffazman/bootcamp-devops

πŸ“ Steps

Step 1: Fork Repository

  1. Navigate to repository:

    • Open browser β†’ https://github.com/opariffazman/bootcamp-devops
  2. Fork repository:

    • Click "Fork" button (top right, beside Star)
    • Pastikan "Copy the main branch only" is checked
    • Click "Create fork"
  3. 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"


Step 2: Clone Fork Anda

  1. 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)
  2. Open terminal dan navigate ke folder kerja:

mkdir devops-labs
cd devops-labs
  1. Clone repository:
git clone [email protected]:[your-username]/bootcamp-devops.git

Gantikan [your-username] dengan username GitHub anda!

  1. Masuk ke dalam folder dan verify git:
# Masuk directory
cd bootcamp-devops

# check url
git remote -v

Expected output untuk git remote -v:

origin  [email protected]:your-username/bootcamp-devops.git (fetch)
origin  [email protected]:your-username/bootcamp-devops.git (push)

Step 3: Setup Upstream Remote

Upstream adalah link ke original repository (instructor punya).

git remote add upstream [email protected]:opariffazman/bootcamp-devops.git

Verify:

git remote -v

Expected 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)

βœ… Lab 2 Checklist

  • Repository forked successfully
  • Fork cloned to local computer
  • Inside bootcamp-devops directory
  • origin remote pointing to YOUR fork
  • upstream remote pointing to original repo
  • Can see repository files