Skip to content
R for the Rest of Us: A Statistics-Free Introduction comes out June 25th. Or you can read the online version today. Check it out →
R for the Rest of Us Logo

Create a Local Git Repository

This lesson is locked

Get access to all lessons in this 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

  1. Create a new RStudio project called local-first

  2. Add a new Git repository to your project using the use_git()function

  3. Make sure the Git tab shows up in the top right panel

Screenshot showing an active Git repository in RStudio.

Have any questions? Put them below and we will help you out!

You need to be signed-in to comment on this post. Login.

Kevin Kairouz

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

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

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.

  1. I don't have the option to create a git repository from the "new project" menu.
  2. When I run use_git(), I get all the same prompts, but no tab is showing up in my environment pane.

Any help would be appreciated.

Elsa Bailey

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

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

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.