Menu
Coddy logo textTech

Add A Second Recipe

Part of the Version Control section of Coddy's Terminal journey — lesson 26 of 58.

The Cookbook now has its initial commit. Time to add a second recipe and capture it in its own commit.

You will create a new file recipes/pizza.md, write a title into it, then stage and commit only that file. The result is a history with two focused commits, each one telling a clear story.

challenge icon

Challenge

Easy

Create recipes/pizza.md with the contents # Pizza (followed by a newline). Stage just that file, and commit with the message Add pizza recipe.

Then print the commit subjects from oldest to newest using git log --reverse --pretty=%s.

Cheat sheet

To stage a specific file and commit it:

git add recipes/pizza.md
git commit -m "Add pizza recipe"

To view commit subjects from oldest to newest:

git log --reverse --pretty=%s

Try it yourself

Terminal
git init -q -b main
git config user.name "Cookbook Dev"
git config user.email "dev@coddy.tech"
echo "*.log" > .gitignore
git add .
git commit -q -m "Initial site"
git log -1 --pretty=%s
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Version Control