PY-1.4-BP2-MQ30

Our Goal: Send Your Work to the Internet

In this lesson, you will learn how to send your special branch (with your new score limit) from your computer to GitHub. This is like uploading your game to the internet so others can see it and you have a backup. You will use a special command to 'push' your branch to GitHub.

Check Where You Are

Before you send your work to GitHub, let's check which branch you are on. You should be on the 'feature/add-score-limit' branch, and it should have your new score limit code.

Run this command in your terminal:

git branch

What you should see:

āœ… The 'feature/add-score-limit' branch should have a star (*) next to it. This means you are on the right branch to push your changes!

Send Your Branch to GitHub

Now, you will send your special branch to GitHub. This is called 'pushing'. When you push your branch for the first time, you need to tell Git where to send it and to remember that place for next time.

Use this command to push your branch. Replace your-branch-name with the name of your branch (like 'feature/add-score-limit'):

git push --set-upstream origin your-branch-name

This command sends your branch to 'origin' (which is your GitHub project) and sets it up so that next time you can just type git push.

Check Your Work Again

You've pushed your branch! Now, let's check to make sure it's on GitHub.

You can go to your GitHub project page in your web browser and look for your branch. It should be listed there.

Or, you can use this command in your terminal to see all the branches on GitHub:

git branch -r

What you should see:

āœ… You should see 'origin/feature/add-score-limit' in the list. This means your branch is now on GitHub!

Documentation

Documentation not available for PY-1.4-BP2.