Get access to all lessons in this course.
-
Introduction to Git and GitHub
- What is Git? What is GitHub?
- Why Should You Learn to Use Git and GitHub?
- Update Everything
-
Git
- Install Git
- Configure Git
- Create a Local Git Repository
- Commits
- Commit History
-
GitHub
- GitHub Repositories
- Connect RStudio and GitHub
- Push an RStudio Project to a GitHub Repository
- Pull a GitHub Repository to an RStudio Project
- Keep RStudio and GitHub in Sync
-
Collaborating with Git and GitHub
- Why Use GitHub vs Dropbox, Google Drive, Box, etc?
- Dealing with Common Problems: Can't Pull Code from GitHub
- Dealing with Common Problems: Merge Conflicts
- Dealing with Common Problems: Can't Push Code to GitHub
- Let's Keep Bad Things from Happening in the First Place
-
Branches
- What are Branches and Why Should We Use Them?
- Branch Names
- How to Create Branches
- Using Pull Requests to Merge a Branch Into Main
-
Project Management with GitHub
- GitHub Issues
- How to Organize Issues
-
Wrapping Up
- Other Cool Stuff You Can Do with GitHub
Using Git and GitHub with R
Push an RStudio Project to a GitHub Repository
This lesson is locked
This lesson is called Push an RStudio Project to a GitHub Repository, part of the Using Git and GitHub with R course. This lesson is called Push an RStudio Project to a GitHub Repository, part of the Using Git and GitHub with R course.
If the video is not playing correctly, you can watch it in a new window
Transcript
Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.
Your Turn
Open the
local-first
project you created previouslyPush your
local-first
project to GitHub using theuse_github()
function from theusethis
package
You need to be signed-in to comment on this post. Login.
Elan Sykes
November 12, 2021
I set my github PAT up without a problem a while ago but returning to this (and catching up on some long-delayed lessons here) I can't connect to github. I get the error message "Error: GitHub PAT must have one of these forms:
When I check on github the PAT is still the one I set up, so I'm not sure how to fix this.
Yuan Liu
March 1, 2023
Hi Dave, I am trying to push a local R project to Github. My goal is to push this R project currently located on my PC only to Github, and then pull it to my MacBook. I believe I have set up PAT correctly in R Studio on both the PC and the MacBook.
I used: usethis::use_github()
I got the error (without showing other actions that were actually successful): Error in libgit2::git_remote_push : failed to receive response: A security error occurred
Googling the error message hasn't gotten me anywhere. Could you share insights on what the "security error" might have been?
Zain Asaf
June 12, 2023
Hi David and Charlie, I am working on something from week 10. I wanted to post the gist for the code as I am getting an error message. I wanted to post the code to an existing project that I have called "zain_rin3-project' However, when I attempt to push the project to github, I get the following error message "Error: Repo 'zainasaf/zain_rin3-project' already exists on 'github.com'. I assume it is possible to push the code to an existing project, and we do not have to create a new project in github each time we post new code. Is there a step that I am missing ?