Your work in the course will be completed in this workspace. Instructions for the two most common tasks you'll perform can be found below.
"Push" your work up to GitHub for backup. By creating "commits", which you can think of as versioned checkpoints in your workspace, you are not at risk of losing your work. It's easy to revert back to an old version or to restore your entire workspace on a different computer.
- Select the View menu and then SCM (Source Control Management)
- Alternatively: Select the Activity Bar icon that's three circles with lines for Source Control
- Notice the files listed under Changes. These are files you've made modifications to since your last backup.
- Move your mouse's cursor over the word changes and notice the + symbol that appears. Click that plus symbol to add all changes to the next backup. You will now see these listed under "Staged Changes".
- If you do not want to backup all changed files, you can select them individually. For this course you're encouraged to back everything up.
- In the Message box, give a brief description of what you've changed and are backing up. This will help you find a specific backup (called a "commit") if needed.
- Open the View menu and select Command Palette, the shortcut for this menu is:
- Windows:
Control+Shift+P
- Mac:
Command+Shift+P
- Windows:
- Begin typing in:
Git: Push to...
and pressEnter
once it is the first option. - Select the
backup
remote that is your personal workspace on GitHub. If you do not seebackup
listed, see the instructions below on Setup Backup Course Material Repository.- You may see a spinning "refresh" icon in your status bar at the bottom of VSCode. Unless an error backing up occurs, you will not see any confirmation.
- If you want to see your backed up work on Github, navigate to the following URL but replace
USERNAME
with your GitHub username: https://github.com/comp110-2023s/comp110-23s-workspace-USERNAME
"Pulling" course materials down from Upstream. As new lesson material or starter code for exercises and projects is added to our central course repository, these are the steps you'll take to download them into your own workspace repository.
- Open the View menu and select Command Palette
- The shortcut for this menu is:
- Windows:
Control+Shift+P
- Mac:
Command+Shift+P
- Begin typing in
Git: Pull From...
and pressEnter
once it is the first option. - Begin typing in
origin
and pressEnter
once it is the first option. - Press enter with
origin/master
as the first option. - This downloads the latest course materials! It will succeed silently, so if nothing appears to happen it worked (and any new files will be available in the file explorer). If there was an error, you would see an error message pop up.
When you are first setting up your personal workspace repository, you will need to follow these instructions to connect the repository on your computer with your personal "backup" course repository on GitHub. As we add new material through the course, you will then be able to easily back it up to your backup repo.
- Navigate a web browser to https://classroom.github.com/a/jq7i3yN9
- Join the Classroom by selecting your ONYEN (Clicking "Skip to the next step" is also OK)
- Click "Accept this Assignment"
- When the workspace is getting setup you may need to refresh until it tells you you're ready to go!
- Click the link to your personal backup repository that looks something like this
https://github.com/comp110-2023s/comp110-workspace-alyssabyrnes
(except instead ofalyssabyrnes
you will see your GitHub username). - Toward the top of the page it will say "Quick setup" and you will see two buttons: HTTPS and SSH. Click HTTPS and copy the text of the URL in the box to the right of the buttons (or click the clipboard icon)
- With your workspace open in VSCode, type in Git: Add Remote and press enter with the option selected.
- In the blank text box that appears, paste in the URL to your backup repository that you just copied. Press enter.
- When asked for "Remote name" type in:
backup
- Follow the steps in the section above on how to "Backup your work."