Interaction with GitHub

Step 1: Clone a repository

  1. Open github.com in your browser.
  2. Navigate to the GitHub organisation for the course.
  3. Find the repository git-configuration-USERNAME that ends with your GitHub username, and open it.
  4. Click on the green “Code” button.
  5. Copy the HTTPS URL to your clipboard.
  6. Open the rbtl-fs24 workspace on posit.cloud
  7. Click New Project > New Project from Git Repository
  8. Paste the HTTPS URL from GitHub into the “URL of your Git Repository” field.
  9. Wait until the project is deployed
  10. Continue with the next step

Step 2: Introduce yourself to git

  1. In Posit Cloud, open the git-configuration-USERNAME project that ends with your GitHub username.
  2. Open the git-configuration.qmd file from the bottom right window of RStudio.
  3. Edit the code chunk under “Git configuration details” and replace the placeholders with your name and email address (these will be the details that git will use to identify you when you commit changes to the repository)
  4. Render the document
  5. Continue with the next step
library(usethis)

# Replace Your Name and Your Email with your details. Do not delete the quotes "".
use_git_config(user.name = "Your Name", user.email = "Your Email")

Step 3: Commit and push your changes

  1. Navigate to the Git pane in the top-right window of RStudio
  2. Check the box next to the git-configuration.qmd file to stage it for commit
  3. Click on the “Commit” button
  4. Enter a commit message in the “Commit message” field
  5. Click on the “Commit” button
  6. Click on the “Push” button
  7. Enter your GitHub username and GitHub Personal Access Token (PAT) in the “Username” and “Password” fields
Do not use your GitHub password

You need to enter the GitHub Personal Access Token (PAT) you created in your homework assignment from Module 1 to push your changes back to GitHub.

Step 4: Open an issue on GitHub

  1. Open github.com in your browser.
  2. Navigate to the GitHub organisation for the course.
  3. Find the repository git-configuration that ends with your GitHub username.
  4. Click on the “Issues” tab.
  5. Click on the green “New issue” button.
  6. In the “Title” field write: “Completed git configuration assignments”.
  7. In the “Leave a comment” field, tag the course instructor @larnsce.