Branches and merging

In this lesson you create a branch of your own, commit on it, and merge the work back into main. A branch is a pointer to a commit, one line with a hash inside .git, which is why creating a branch and switching to it cost almost nothing.

What is already set up

The sandbox has a ready repository ~/site: one commit with the file index.txt, and the commit name and email are already configured. There are three branches. main and experiment sit on the first commit, while wip moved one commit ahead and holds the file wip.txt. You are standing on main and the working directory is clean. The repository was seeded in Russian, so the commit messages and file contents

Locked

The rest of this lesson is part of a paid course

You are reading the open part. Buy the course to unlock the whole lesson and its lab.

See the course