In-class exercise#

Contact data questionnaire#

Please fill out this Google form so we can connect the various places we need to give you credit for this course and let you know about it (GitHub, BASIS, eMail).

Set up groups#

Form groups of 5. You will work in these groups for the next few lectures and the first assignments.

Please try to make sure that the groups are balanced in terms of previous knowledge.

If we realize they are not, we will assign random groups instead.

Post a message in Zulip (EPP - 2024 / Groups) with the names of your group members.

Cloning the repository#

Note: Today’s in-class exercise uses individual repositories and should be completed on each individual machine. Nevertheless, we encourage you to work in your groups and help out others if they need it.

The in-class exercise is distributed via a GitHub Classroom repository. To get access to your Git repository, you can click on this link and follow the instructions.

After cloning the repository you can start with the tasks:

Shell Navigation#

  1. Open a terminal.

  2. Move to the home directory (MacOS / Linux) or user profile (Windows).

  3. Create a new directory called “inclass_exercise_1”.

  4. Print the current working directory.

  5. List the files and folders of your current directory.

  6. Move into the newly created directory.

  7. Print the current working directory.

  8. List the files and folders of your current directory.

  9. Go back up to the home directory (user profile).

  10. Print the current working directory.

Git#

  1. Change into the directory of the cloned repository.

  2. List all the contents of the cloned repository

    Note: You can use "ls -a" (on MacOS) or "ls -hidden" (on Windows) to see all files, including hidden ones. You should be able to see the .git folder.

  3. Check the current status of the repository to see if there are any changes.

  4. Add the word “apple” to the file a.txt and “banana” to the file b.txt.

  5. Check the status of the repository.

  6. Display the commit history (log) of the repository.

  7. Commit only the changes in file a.txt. Remember to use a sensible commit message.

  8. Again, check the status of the repository.

  9. Commit the remaining changes in file b.txt.

  10. Again, check the status of the repository.

  11. Check the commit history again to view your new and previous commits.

  12. Create a new file called c.txt and add the word coconut to it.

  13. Check the status of the repository.

  14. Stage the new file for a commit.

  15. Again, check the status of the repository.

  16. Commit your changes.

  17. Type git push in your shell in order to upload the changes to GitHub

  18. Go to the GitHub page of your repository and check that the changes indeed have been uploaded and the files online look the same as the files on your computer.

Markdown#

  1. Open an issue on the GitHub page of your repository and add some well formatted text.

  2. Write a Zulip message to one of your classmates that contains at least one code snippet and a math formula

  3. Edit the README file of your repository and describe what the purpose of the repository is. Commit and push the changes to GitHub.