World map

 

BM: Baca dalam Bahasa Melayu

World 1: Save Points · Boss challenge

Diary site: 5 clean commits

You will learn: to build a diary site, one clean commit at a time.

The problem

Five files wobble in the diary folder: README.md, index.html, style.css, about.html and a junk file, debug.log.

Your diary site is ready. Four real files and one junk log. Can you save it as five clean commits?

Watch

The files leave the working folder. Five commits line up in the repository: Add README, Add home page, Add purple style, Ignore log files, Add about page.

Here is the plan: one change per commit. Each message is short and starts with an action word.

Try it

Build the site in five stages. Every message must be clean. Made a mistake? Press “Start again”.

Step 1 of 5: Start the repo

Make the diary a repo. Then commit README.md.

Check

Why did style.css and the link in index.html share one commit?

Pick one answer.

Try it

Optional: build it again on your own computer. Same plan, real Git.

Real mission

  1. mkdir diary-site
  2. cd diary-site
  3. git init
  4. git add README.md
  5. git commit -m "Add README"
  6. echo "*.log" > .gitignore
  7. git log --oneline

0 of 8 steps done · Your ticks are saved.

Check

Paste your real git log --oneline below. The check runs on this page only. Nothing is sent anywhere.

You did it!

You can now build a project with small, clean commits.