World map

 

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

Your laptop~/diary
  1. def9487Add about page (only on your laptop)main (HEAD is here)
  2. ea2c020Add purple style (only on your laptop)
  3. f6c78e5Add home page (only on your laptop)
  4. 2efd0f2Add README (only on your laptop)
No remote yet
GitHubgithub.com/you/diary
Empty. No commits yet.

Your diary site is ready on your laptop. GitHub is still empty. Aisyah wants to help. Publish it, and stay in sync!

Watch

git log shows the diary site's four commits: README, home page, purple style and about page. Terminal output: $ git log --oneline def9487 (HEAD -> main) Add about page ea2c020 Add purple style f6c78e5 Add home page 2efd0f2 Add README

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.

2efd0f2f6c78e5ea2c020def9487

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

  1. git remote add origin https://github.com/YOUR-USERNAME/diary.git
  2. git push -u origin main

0 of 4 steps done · Your ticks are saved.

Check

Let’s check with GitHub. Type your username.

Check it on GitHub

Your username is sent only to api.github.com.

  • 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.