Menu
CoddyTech

Merge The Feature

Part of the Version Control section of Coddy's Terminal journey. Lesson 54 of 58.

Both branches now have new commits. Time to bring them together. You are on main, so merging add-task creates a clean three-way merge: the two branches touched different files, so there will be no conflict.
challenge icon

Challenge

Easy

Merge add-task into main with the message Merge add-task. Print the contents of todo.txt followed by readme.md using cat todo.txt readme.md.

Every run starts from a fresh copy of the folder, and the whole script in the editor runs again from the top. Nothing is committed for you: the editor starts with the commands of the previous steps (git init -q -b main, the git config lines and the commits so far). Keep those lines in the editor. If you clear them you will see fatal: not a git repository.

Try it yourself

Terminal
git init -q -b main
git config user.name "Todo Dev"
git config user.email "todo@coddy.tech"
git add .
git commit -q -m "Seed todo list"
git switch -q -c add-task
echo "walk the dog" >> todo.txt
git add todo.txt
git commit -q -m "Add walk task"
git switch -q main
echo "This is the project readme." >> readme.md
git add readme.md
git commit -q -m "Expand readme"
# Your commands below
quiz iconTest yourself

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

All lessons in Version Control

Practice on your own: Terminal playground