Push an RStudio Project to a GitHub Repository
This lesson is called Push an RStudio Project to a GitHub Repository, part of the R in 3 Months (Fall 2021) course. This lesson is called Push an RStudio Project to a GitHub Repository, part of the R in 3 Months (Fall 2021) course.
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
Have any questions? Put them below and we will help you out!
Course Content
134 Lessons
1
Welcome to Getting Started with R
00:57
2
Install R
02:05
3
Install RStudio
02:14
4
Projects
07:54
5
Files in R
04:33
6
Packages
02:38
7
Import Data
05:24
8
Objects and Functions
03:16
9
Examine our Data
12:50
10
Import Our Data Again
07:11
11
Getting Help
07:46
12
Wrapping Up
13
R in 3 Months Fall 2021 Week 1 Live Session
54:07
1
Getting Started
03:01
2
The Tidyverse
12:11
3
select
05:48
4
mutate
04:08
5
filter
10:26
6
summarize
03:20
7
group_by
02:56
8
count
02:06
9
arrange
03:58
10
Create a New Data Frame
02:42
11
Crosstabs
06:58
12
Wrapping Up
13
R in 3 Months Fall 2021 Week 3 Project Assignment
06:03
14
R in 3 Months Fall 2021 Week 3 Office Hours
55:49
15
R in 3 Months Fall 2021 Week 3 Live Session
1:10:01
1
An Important Workflow Tip
05:00
2
The Grammar of Graphics
06:08
3
Scatterplots
05:15
4
Histograms
02:31
5
Bar Charts
06:32
6
color and fill
03:58
7
scales
09:14
8
Text and Labels
08:04
9
Plot Labels
06:06
10
Themes
03:56
11
Facets
05:57
12
Save Plots
05:17
13
Wrapping Up
14
You Did It!
15
R in 3 Months Fall 2021 Week 4 Project Assignment
04:40
16
R in 3 Months Week 4 Office Hours
56:30
17
R in 3 Months Fall 2021 Week 4 Live Session
1:05:25
1
What is Git? What is GitHub?
02:23
2
Why Should You Learn to Use Git and GitHub?
03:04
3
Update Everything
07:34
4
Install Git
04:04
5
Configure Git
02:10
6
Create a Local Git Repository
03:16
7
Commits
06:00
8
Commit History
04:28
9
GitHub Repositories
04:47
10
Connect RStudio and GitHub
05:06
11
Push an RStudio Project to a GitHub Repository
02:57
12
Pull a GitHub Repository to an RStudio Project
02:52
13
Keep RStudio and GitHub in Sync
02:27
14
R in 3 Months Week 6 Office Hours
59:43
15
R in 3 Months Fall 2021 Week 6 Project Assignment
07:55
16
R in 3 Months Fall 2021 Week 6 Live Session
54:10
1
Overview
2
Importing Data
15:45
3
Tidy Data
08:11
4
Reshaping Data
10:18
5
Dealing with Missing Data
04:56
6
Changing Variable Types
05:30
7
Advanced Variable Creation
19:26
8
Advanced Summarizing
10:00
9
Binding Data Frames
06:50
10
R in 3 Months Fall 2021 Week 7 Project Assignment
06:14
11
R in 3 Months Fall 2021 Week 7 Live Session
51:31
12
R in 3 Months Week 7 Office Hours
35:07
1
Data Visualization Best Practices
04:51
2
Tidy Data
04:01
3
Pipe Data Into ggplot
04:50
4
Reorder Plots to Highlight Findings
06:09
5
Line Charts
04:10
6
Use Color to Highlight Findings
08:25
7
Declutter
10:47
8
Use the scales Package for Nicely Formatted Values
03:42
9
Use Direct Labeling
11:43
10
R in 3 Months Fall 2021 Week 10 Project Assignment
04:47
11
R in 3 Months Week 10 Office Hours
52:28
12
R in 3 Months Fall 2021 Week 10 Live Session
1:13:30
1
Use Axis Text Wisely
03:15
2
Use Titles to Highlight Findings
03:33
3
Use Color in Titles to Highlight Findings
03:51
4
Use Annotations to Explain
04:52
5
Tweak Spacing
05:11
6
Customize Your Theme
02:48
7
Customize Your Fonts
08:18
8
Try New Plot Types
11:50
9
R in 3 Months Fall 2021 Week 11 Project Assignment
10
R in 3 Months Week 11 Office Hours
1:07:41
11
R in 3 Months Fall 2021 Week 11 Live Session
48:31
1
Advanced Markdown Text Formatting
10:52
2
Tables
19:33
3
Advanced YAML
11:49
4
Inline R Code
06:57
5
Making Your Reports Shine: Word Edition
06:53
6
Making Your Reports Shine: HTML Edition
06:32
7
Making Your Reports Shine: PDF Edition
08:21
8
Presentations
04:21
9
Dashboards
06:28
10
Other Formats
04:57
11
You Did It!
12
R in 3 Months Week 12 Project Assignment
08:22
13
R in 3 Months Week 12 Office Hours
54:19
14
R in 3 Months Week 12 Live Session
59:42
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 ?
Mike LeVan • January 16, 2025
Hi. Question about the repository name. Basically, what is it based on? Is it the name from the Files tab, "local-first.Rproj"? I have a script called "Practice-Repositry-1" and when I ran the command to create a new repository, the repository created was "project" and the only place I saw this used was in the Files tab with the file "project.Rproj".
I was playing around and changed "project.Rproj" to "BLAH-1.project" and tried to create a repository for that, but I got an error that says, " Repo "levanj/project" already exists on "github.com".
Is there an easy way to change the names? Thanks.
David Keyes Founder • January 17, 2025
The repo name is based on the folder name that houses the materials, not the .Rproj file. If you want to change the name of your repo, go to settings in any repo and then you'll see the option to rename at the top. Let me know if that helps!
Mike LeVan • January 17, 2025
Thanks. That does help. This (/cloud/project) appears to be the default when using Posit Cloud.
Does this mean any new project will have "project" as. the default repository name? Is there an easy way to point it to a different repository? I have played around a bit with changing the working directory but it doesn't seem to create a new repository when I do this.
I guess my question is how to get Post Cloud to point to a different repository other than "project"? I tried changing the working directory to something like /cloud/project/BLAH but it doesn't seem to be working.
Apologies for the questions. I'm a Git newbie.
David Keyes Founder • January 17, 2025
I'm not sure I'm completely following. Could I have you record a quick video so I can see what you're asking?
Mike LeVan • January 17, 2025
Hi. Recording sent. Apologies that since I am new to this I am probably not asking the correct questions or using the proper vernacular.
David Keyes Founder • January 18, 2025
Just reviewed your video, which was helpful. I didn't realize you were using Posit Cloud. Unfortunately, I don't know the answer to how you would do this. I would consider reaching out to Posit to ask. The one thing I do see within Posit Cloud is the ability to start a new project from a GitHub repository. So you might consider creating your project there and then adding to Posit Cloud. I just tested and that does work. It will still show up as Cloud > project, but I think it should work. I synced this repo to Posit Cloud and here's what I see. Hope this helps!