%%{ init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': { 'showBranches': true, 'showCommitLabel':true, 'mainBranchName': 'remote' }, 'themeVariables': { 'git0': '#88CCEE', 'git1': '#CC6677' } } }%% gitGraph commit id: "start" branch local commit id: "Updated Header" commit id: "Fixed math" commit id: "Added prose" checkout remote merge local id: "Push"
Onboarding
Onboarding for our technology.
You are welcome to work on these assignments locally, rather than inside of a GitHub codespace. However, I cannot, at this time, provide active tech support beyond directing you to already existing how-tos and documentation if you run into technical issues.
I’ve put a lot of effort into trying to sand off as many of the sharp edges of using R & RStudio within the codespaces, sharp edges you may discover working locally on your own computer! Running into these issues and figuring out how to fix them is part of the learning process in tech, but at this point, you might want to devote more of your time and mental energy to the core content of the course.
A Github Account
If you haven’t already, create a GitHub Account
Then, be on a lookout for an invite to the GitHub organization for the course.
Accepting a GitHub Classroom Assignment
I’ll be posting GitHub Classroom Assignment links to canvas, and also to the discussions forum on the GitHub Organization (this link will only be visible if you have joined the organization).
Your Repository
After clicking on an assignment link, github will create an assignment repository for you in the Lin611 organization. To re-find your repository, after you’ve created it, either
- Go to browse the list of repositories under the organization, and search for your username.
- Click on the original assignment link again.
Your repository will be given the name <assignment-name>-<username>
.
This is a fork of the original assignment repository.
Codespaces
I will usually configure assignments to automatically use codespaces, which means a button labelled “Laungh Codespaces” will be included in the README file. In case that doesn’t appear, you can launch a codespace manually by:
- Going to your assignment repository,
- Clicking on the green <> Code button,
- Clicking on the “Codespaces” tab.
- Clicking on the Create codespace on main button.
It will take a little bit of time for the codespace to boot up. Clicking on the “Building codespace” link that appears at the bottom of the screen will let you see what’s happening, in case you get nervous that everything is frozen.
Once the codespace is booted up, you can launch RStudio one of two ways:
- At first, a little notification box will pop up saying “Your application is running” and giving you a little “Open in browser” button.
- If the notification has gone away, or you are returning to your codespace, navigate to to the “Ports” tab, and click on the little url in the table next to “RStudio IDE”.
The way I’ve configured things, you’ll see the loading wheel (), then RStudio will flash up, then the loading wheel will appear again (), then RStudio will appear again. This is ok.
Making your work count
So you’ve worked on the assignment. How do you make sure your work is preserved and submitted properly? Let this be your mantra:
Save.
Stage.
Commit.
Push.
Unless you have done these 4 things, I won’t be able to see your work, and it might all get lost if you delete the codespace.
“Save”
When a file name is in red, and has a little asterisk, that means you’ve made edits, but haven’t saved the file.
You can save the file with the usual Hotkey: .
“Stage”
In the top right pane, click on the Git tab, and then the Diff button to pop open the diff window.
In the diff window, you’ll see a list of all of the files that have changed since the last commit, with checkboxes. At the bottom of the window, you’ll see a visual representation of what changes have been made.
Select the checkbox ✅ for all of the files you want to include in the commit.
“Commit”
Now, in the commit message box, enter an informative commit message (git makes this mandatory). Then click “Commit”.
“Push”
Last BUT MOST IMPORTANT, push the commits to GitHub by clicking on the Push button.
If you do not push your commits,
- I will not be able to see your code, or what you’ve done.
- It will not count as “submitted” for GitHub classrooms.
- If your codespace shuts down after being idle for a while (a few days), all of your work will be lost.
The Git Rhythm
You don’t need to go through the whole cycle of Save - Stage - Commit - Push every time you make a change to a file. You can include changes in multiple files in one commit, and you can let a few commits pile up before you push them all.
“Pull Requests”
Pull requests are requests sent through GitHub for you to merge commits from a different branch or fork into another one. You’ll encounter pull requests on your assignment repos in two different ways.
“Feedback Pull Requests”
GitHub classrooms will create a new “feedback” branch when your assignment is created, then open a Pull request from “main” back into feedback.
%%{ init: { 'logLevel': 'debug', 'theme': 'base', 'themeVariables': { 'git0': '#88CCEE', 'git1': '#CC6677' } } }%% gitGraph commit id: "start" branch Feedback commit id: "feedback" checkout main commit id: "Working" commit id: "Debugging" commit id: "Why won't it work" commit id: "Fixed it" checkout Feedback merge main
For a pull request like this, where all of your work is being merged into the Feedback branch, GitHub enables what is known as “code review”. For big software projects, this allows developers to look over and ask questions about new code coming into their repository before they actually merge it. For our purposes, it’s a place for me to give you feedback on your code.
Assignment syncs
I’m only human, and sometimes there might be a mistake, or an error, or something that needs updated in the original assignment code. If you’ve already accepted the assignment, and your repository has been created, the way for me to send you important updates to an assignment will be through a pull request.
%%{ init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': { 'showBranches': true, 'showCommitLabel':true, 'mainBranchName': 'assignment-template' }, 'themeVariables': { 'git0': '#DDCC77', 'git1': '#88CCEE' } } }%% gitGraph commit id:"publish assignment" branch main commit id: "Working" commit id: "Being clever" commit id: "Something's wrong" checkout assignment-template commit id: "I made a mistake" commit id: "Fixed it" checkout main merge assignment-template
I’ll let you know when this happens, so you’ll know to double check the Pull Requests tab.
Reuse
Citation
@online{fruehwald2024,
author = {Fruehwald, Josef},
title = {Onboarding},
date = {2024-08-28},
url = {https://lin611-2024.github.io/notes/meetings/2024-08-28_onboarding.html},
langid = {en}
}