Using Visual Studio Code

You will be using Visual Studio Code to edit your files. Open VS Code by again clicking on the “nine dots” icon in the bottom left of your screen, typing “visual” in the search box that appears at the top, then click on the “Visual Studio Code” program, as shown in this screenshot:

Installing the Extension Pack for Java

To help support our development this semester, we will need to install the Extension Pack for Java in VS Code. To do so, first click on the fifth icon down on the left side of your VS Code window that looks like:

Next, in the search bar that appears in the top left, search for “Java” and click on the “Extension Pack for Java” option:

Finally, click on the Install button on the main part of VS Code:

Now, VS Code will be much more capable in helping us code and debug in Java!

Editing Files

In VS Code, select File and then Open, and then navigate to the repository you just cloned, and open README.md.

In README.md, write your name where it says “Name: ”, and then go to File and then Save to save your changes.

Now that we’ve modified this file, we need to save our changes back to GitHub. To do this, we need to do three things: First add the file to our collection of changed files, commit the file, which makes the changes locally, and then push, which saves our changes to GitHub.

Go back to your Terminal window, and type:

cd lab1-xxx

Replace lab1-xxx with the name of your repository. “cd” is a linux command that stands for “change directory”. This has moved you into the directory for your git repository.

Now, type the following into your Terminal:

git add README.md
git commit -m “added my name to the readme file”
git push

Now go to GitHub, and look at your repository. You should see your commit message (“added my name to the readme file”) next to README.md, and a very recent commit date. If you click on README.md on the repository webpage, it should show your name in it.