PY-1.4-BP1-MQ20

Our Goal: Make a New Branch

In this lesson, you will learn how to make a new 'branch' for your game project. Think of a branch as a separate copy where you can work on new ideas without changing the main game. You will make a new branch called 'feature/add-score-limit' and then check to make sure it's there.

Check What You Have

Before you start, let's see what branches you have right now. You should be on the 'main' branch.

Run this command in your terminal to see your branches:

git branch

What you should see:

āŒ You should not see 'feature/add-score-limit' in the list. This means you are ready to create it!

Make Your New Branch

Now it's time to create your new branch! Remember, a branch is like making a copy of your project so you can work on new things safely.

First, you need to be in your project's main folder in the terminal.

To make a new branch, you use the git branch command. Here's an example of how to make a branch called 'my-new-idea':

git branch my-new-idea

After you make your branch, you can see all your branches with this command:

git branch

Look for the new branch you just made!

Check Your Work Again

You've made your new branch! Now, let's check to make sure it's there.

Run this command in your terminal:

git branch

What you should see:

āœ… You should now see 'feature/add-score-limit' in the list of branches. This means you did it!

Documentation

Documentation not available for PY-1.4-BP1.