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
Create a Local Git Repository
This lesson is locked
This lesson is called Create a Local Git Repository, part of the Using Git and GitHub with R course. This lesson is called Create a Local Git 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
Create a new RStudio project called
local-first
Add a new Git repository to your project using the
use_git()
functionMake sure the Git tab shows up in the top right panel
You need to be signed-in to comment on this post. Login.
Kevin Kairouz
October 21, 2021
I get this error when using use_git() : Function executeCommand not found in RStudio
anyone has a work around?
Julieth Silao
October 6, 2022
hello David. I connect with my username and email, but the email doesn’t pick up while its the same email i used in github account. can you help
Ben Skutnik
October 6, 2022
Hi David,
I've got the most current versions of R (4.2.1) and RStudio (2022.07.2+576) and updated all of my packages (though gert has a zero-exit warning). But two differences have come up while following your instructions.
Any help would be appreciated.
Elsa Bailey
October 31, 2022
Hi, I can't seem to get the Git tab to show. I've created a "local-first" project, and within that ran the following: library(usethis) > use_git_config(user.name = "Elsa Bailey", user.email = "ebbailey@earthlink.net") > library(usethis) > use_git() ✔ Setting active project to '/Users/elsabailey/Desktop/local-first' > I never see the "create a git repository" check box when creating a new project, and I never see a message about "initialising Git Repo". I've tried following the steps in all the lessons several times, have confirmed that I have installed git 2.33.0, but can't seem to get to a screen in RStudio that shows the Git tab. I also never get a message asking to restart RStudio to activate the Git pane. I've tried quitting and restarting it myself, but that doesn't reconfigure the tabs either. I am stuck, and can't proceed with the subsequent lessons as a result. Any advice will be appreciated. Thanks!
Nicholas Lai
April 17, 2023
Hi David, When I run all the prompts the tab doesn't show up still. Not sure how to fix this issue. Nick
Chelsea Ruder
May 2, 2023
Hi David - I thought we problem solved this last week but I am still getting errors when setting up a git repository.
Error in libgit2::git_signature_default : config value 'user.name' was not found
I can try to get to office hours tomorrow to troubleshoot.