Skip to content

info201b-2023wi/lab2-git-markdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

git and markdown

The purpose of this lab is to get you prepared for PS1, hence the tasks are comparable. Here are the tasks:

Basic git workflow

  1. Ensure that you have a folder on your computer where you store info201 exercises. If needed, create one. Now use your shell to navigate to this directory, and write the command (or commands if you use multiple) here underneath. Use markdown code blocks to mark your commands.

    Here is an example:

    cd Desktop/school/info201/labs
    
  2. fork this repository on Github under your user name (see course book 4.6.1).

  3. clone the forked repo to your computer (see course book 4.3.3). Write the command you used underneath in a code block.

  4. add a new file "books.md" to the repo. You can use RStudio (file -> new file -> markdown file), or any other tool you find convenient.

  5. add a numbered list of book you like to this file (see Github markdown docs). You can use RStudio editor, or any other editor you like.

  6. check git status (see course book 4.4.1). Show below, in block quote, what does it print.

    Explain, in plain text, what does it mean.

  7. add the new file to the repository (see course book 4.4.3). Show your command (as a code block).

  8. Was your add successful? Check status again! Explain what do you see.

  9. Now commit your changes (see course book 4.4.4). Put your command underneath in a code block.

  10. Was your commit successful? How can you check it? Show your command(s) as a code block and explain what you see!

  11. Now push your changes to Github (see course book 4.4.5). You may need to create access token before you are able to push.

  12. Go to your github page. Can you see the books.md file there with all the books listed?

Folders and relative path

This task is about adding images and using relative path.

  1. create a folder "images" to your repo. You can use either mkdir command, or the file manager.

  2. put an image into the folder. It should be of a type that Github can render, e.g. .jpg or .png, not sure about .heic or other very new formats. (You can just download or copy it there).

  3. check git status. What do you see?

  4. add image to the repo. Show the command you are using in a code block.

  5. check status again. Does it indicate that the image has been added?

  6. what is the relative path of your image if you start walking there from the location of your books.md file?

    You can check if the path is correct with something like ls path-to/file, e.g.

    ls images/picture.jpg
    

    it lists the file name if correct, and complains about no suc file or directory if the path is wrong.

  7. now add the image to your books.md file using the relative path.

  8. check git status and commit

  9. push

  10. check on github--does your books.md file now contain the image?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published