Git tab dissappeared

I've been using Git with RStudio for quite some time, but today I noticed that the Git tab disappeared. I didn't use Git for a few days so that it may disappear earlier.
The problem looks similar to this thread: Git Tab no longer appearing, but I'm on Windows

> Sys.info()
          sysname           release           version 
        "Windows"          "10 x64"     "build 22000" 
         nodename           machine             login 
        "DESKTOP"          "x86-64"            "Oleg" 
             user    effective_user 
           "Oleg"            "Oleg" 

I've chosen the Git option for the version control system in the Project Options, agreed to initialize a new git repo, and restart the session. However, RStudio doesn't see the Origin:

while usethis::use_github() definitely sees where the origin is:

> usethis::use_github()
i Defaulting to 'https' Git protocol
√ Setting active project to 'D:/****'
Error: This repo already has an 'origin' remote, with value 'https://github.com/****.git'.
You can remove this setting with:
`usethis::use_git_remote("origin", url = NULL, overwrite = TRUE)`

I've been recentrly updating all Windows, RStudio, and Git to the latest versions.

What can I do with that problem?

I managed to get the Git pane back. Unfortunately, I did not notice the exact moment when it re-appears.

Two points one of which, most likely, solved the problem:

  1. usethis::gh_token_help() showed the warning that the email is not registered with GitHub; so I used usethis::use_git_config(user.email = "name@example.org") to fix it (name@example.org - is email I used to register account at GitHub.

  2. When I tried git status within the terminal in RStudio, I got an error message that the main directory is used by someone else and might not be safe. This error message is followed by a recommendation to add the project directory to the list of "safe exemptions" with the command git config --global ....... After running this command I noticed that RStudio sees the Origin in the ProjectOptions -> Git/SVN. After restarting RStudio, the Git pane was back.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.