Menu
Coddy logo textTech

First Commit

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

The repo is initialized and the build artifact is ignored. Time to take the first snapshot.

This lesson stages every visible file in the project at once and creates a single commit named Initial site. After this, the entire starting state of the project is preserved in the history.

challenge icon

Challenge

Easy

Stage all the source files (use git add .), then create the first commit with the message Initial site.

Print the latest commit subject using git log -1 --pretty=%s.

The repo is already initialized, configured, and has a .gitignore excluding *.log.

Cheat sheet

Stage all files and create the first commit:

git add .
git commit -m "Initial site"

Print the latest commit subject:

git log -1 --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 status --short
quiz iconTest yourself

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

All lessons in Version Control