PY-1.4-BP1-MQ70

Our Goal: Bring Your Work to the Main Game

In this lesson, you will learn how to bring the score limit you made on your special branch into the main game. This is like putting your new idea into the real game for everyone to play! After you do this, you will check the game to make sure the score limit is working in the main game.

Check Where You Are

Before you bring your new work into the main game, let's check where you are. You should be on the 'main' branch, and your 'feature/add-score-limit' branch should still be there.

Run this command in your terminal:

git branch

What you should see:

āœ… The 'main' branch should have a star (*) next to it. This means you are on the main branch. āœ… You should also see 'feature/add-score-limit' in the list. This means your special branch is ready to be brought into the main game.

Bring Your Work to the Main Game

Now it's time to bring your new score limit feature into the main game! This is called 'merging'.

First, make sure you are on the 'main' branch. You can check with git branch.

Then, use the git merge command to bring in the changes from your special branch. Here's an example of how to merge a branch called 'my-new-idea' into your current branch:

git merge my-new-idea

After you run this command, Git will combine the changes from your 'feature/add-score-limit' branch into the 'main' branch.

Check Your Work Again

You've merged your work! Now, let's check the main game to make sure the score limit is there.

First, make sure you are still on the 'main' branch. You can check with git branch.

Then, run your Pong game. Play it for a bit. Does the game stop when a player reaches 5 points? It should now! This means your score limit feature is now part of the main game.

Documentation

Documentation not available for PY-1.4-BP1.