Some general resources
Happy Git and GitHub for the
useR
Create a GitHub account for
education using your UChicago email address. This may involve
sending a picture of your student ID or verifying your student status in
some other way. Getting approval might take a few minutes or a few days,
so do this ASAP!
Install
General
install guide
- Git
- Many options! You just need one. A binary installer will likely be
easiest for you if you’ve never used the terminal or command line.
- R
- R
studio
Note: The first troubleshooting step for any issues with
Terminal should be to start a new session (i.e., fully quit and reopen
Terminal).
Connect
Connecting
RStudio & GitHub Guide
Create and store a personal access token for HTTPS (recommended,
very easy) or keys for SSH.
Again, many options for how to do this. If you don’t already have
a preference, I recommend following the directions in section 9.1 TL;DR. Those
simple steps should be enough to get everything working and let you skip
any additional steps in the terminal.
Create a repo on GitHub:
Clone the repo (from GitHub) as a new project in R studio. This
will result in a new project containing 3 files: the .Rproj file, the
.gitignore, and README.md.
- Confirm that you can pull from GitHub to R Studio:
- Edit the readme file on the GitHub website. Add some new text or
make any other obvious change.
- Commit the changes with an informative commit message.
- In R studio, open the Git tab and click pull. You should see a brief
message describing the changes. Open the readme file in R studio and
confirm the changes appear.
- Confirm that you can push to GitHub from R Studio:
- Edit the readme file in the R Studio editor. Again, add some text or
make any other obvious change and then save the file.
- To commit the changes, click “Commit” in the Git tab to open the
“Review Changes” window. Select the files you have added, deleted, or
edited (in this case just README.md). You should now see a message in
the Review Changes window that says “Your branch is ahead of
‘origin/main’ by 1 commit.”
- Click “Push” to push your committed changes to GitHub.
- Check that the changes are reflected in the readme file on
GitHub.