Missing Git tab in Rstudio on Windows computer

I've tried to reinstall Git and Rstudio and also reset the Rstudio setting, and successfully cloned a repo from GitHub. However, I the Git tub is not showing and the Terminal looks just like a Window Terminal (not like a Git Terminal). In the Global Options, my Git executable and SSH RSA key are showing up. My git version is 2.34.1.windows.1
However, even after I just cloned the project, when I went to the Project Options, "Version control system" was saying "None".
I was working well with my setup, but suddenly yesterday my Git tab was gone.
The only thing I can suspect is that my office computer was reconfigured to have the OneDrive folder as the default folder. But even then, I create a soft link from the folder where I have my ssh key to the new HOME folder.
I hope you can help me with this bizarre issue.

Do you mean the git tab alonside Environment and History on the right? I think this only shows up if you actually use version control in the project you are working on. To enable version control go to Tools->Project options->GIT/SVN and choose git in the dropdown menu. Maybe your project settings were mangled in the move from home to onedrive.
Hope this helps,
Valentin

Hi Valentin,
Thank you for your response. It's the Git tab alongside the Environment and History tabs.
I can still use git manually. I can push it to my Git repo. But it still wouldn't show me the Git tab.
As I mentioned above, I tried to clone my repo. But the moment it's successfully cloned, I cannot see the Git tab, and when I went to Tools -> Project Options -> Git/SVN it showed "(None)".
I just don't think the project settings were mangled from home to OneDrive because I cloned the project from the GitHub repo. Hence, there shouldn't be any problem with the default project setting.
I also included a picture for your reference. As in the screenshot, my branch is up-to-date (since I just cloned it), but the tab would not show up and version control system is "None".

And clicking on "(None)" does not give you the option to choose git? Apart from that you could try usethis::use_git() on your project, this may fix things. You may need to install that package by running install.packages("usethis"). Apart from that I am at a loss unfortunately. Best of luck!

Hi Valentin,
I've tried both ways. And I believe the project is successfully connected to GitHub, but it still would not give me the Git tab.

Okay that's weird. Well at this point I am only guessing, I'm sorry.
What about starting a new project using git from the beginning? Is the git tab present then? In that case it may be worth the try setting up a new project with git (new project -> new directory -> check "create git repository" ) and connecting to your remote branch afterwards?
Apart from that, you may also try resetting the project state by renaming the hidden folder ".Rproj.user" in your project directory.

Best of luck!
Valentin

I tried creating a new project using git and reset the Rstudio Desktop's state, but the problem still remains.
Thank you for your suggestion.

I've finally figured the root cause of this problem. If anybody else is having troubles with their Git tab, here is the solution:

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.