The objective of this exercise is to create a java file, add it, commit and push to a remote repository.
-
In your local machine, go to the folder where your assignments repo was cloned
...../APCSA1/apcsa-assignments-fall-YourUsername/
, executegit pull
and create a folder classwork. -
Create a folder 09_09_hello_world inside the classwork folder.
-
Write a java file HelloWorld.java that prints the message "Hello World!".
-
Run
git status
. What does it show? -
To add the new file to the repository, run the following command from the root (top-level,
...../APCSA1/apcsa-assignments-fall-YourUsername/
) of your repo, not from inside the classwork folder:git add classwork/09_09_hello_world/HelloWorld.java
-
Run
git status
again. What does it show this time? -
Commit and push the file to your repo.
-
Go to GitHub, HelloWorld.java should be there.