Git tab disappeared, but repositories remain


#1

I use RStudio with Rmarkdown routinely in my work. A couple of weeks ago, overnight, RStudio started displaying a series of fleeting windows at startup. I have not figured out how to capture and read those. I am running Windows 7 and R 3.3.3. When the Git tab went missing, I decided to update both RStudio (now at 1.0.153) and Git (now at 2.14.1.windows.1).
This version of Git seems to have changed some things, so I don’t know if my original problem remains the problem. There are several different git.exe files of the latest version, and I have tried setting the Git path in RStudio to each of them, I think. The current setting in the RStudio Global Options “C:/Program Files/Git/mingw64/bin/git.exe”, but that still produces a series of windows at startup, and no Git tab. I have found out, though, that the Git repositories are still present in the various directories, and I can interact with them using Git Bash or Git Gui, just not within RStudio. I got used to the RStudio interface and I think it’s more convenient for me, so if anyone has some ideas on how to make it work again, I’d appreciate it.


#2

I feel like the odds of this being the case are low, but is there any chance that it is there but just off screen? I recently thought my git tab had disappeared but it turned out I had too many things in one pane for how large I had my window set to:


vs.

Also, under “View” there is an option to “Show Git” and under “View” > “Panes” there is “Zoom Git”. I’m curious what happens when you go to one of these.


#3

Thanks for the reply, Scott. I have only the Environment and History tabs open, and there is nothing to the right. The “Show Git” and “Zoom Git” options (I don’t think I ever use the View menu) do not appear in my menus. I don’t think RStudio is successfully finding Git when it starts up, because Git is not where it expects it to be. So Git is there, but RStudio doesn’t know that. This may have something to do with the Windows PATH environment variable, which I have tried to fix based on advice found elsewhere, to no avail.


#4

Does RStudio found git ?
What is the path for git in Global Options > Git/SVN ?
And where Git is installed on your system ?


#5

To review: No, I don’t believe RStudio is able to locate Git. It doesn’t display the Git tab or related menu choices. My guess is that some of the windows that appear and disappear before I can read them relate to RStudio not finding Git files it’s looking for.

The path in Git Global options is “C:/Program Files/Git/mingw64/bin/git.exe”, but as I mentioned, there are other copies of git.exe:

I believe it’s the third file on that list that’s running when I invoke Git Bash in a folder with a Git repository, which is why I set the RStudio path the way I did. But I think I have tried them all, and none of them worked as intended. But, I may not have tried them all with the PATH variable set up in the appropriate way.


#6

On my windows PC, I use the first one C:/Program Files/Git/bin/git.exe.
I configured it in the global option of RStudio, saved and restarted RStudio. The systeme PATH environment variable must not contained another one. If you set git path in this PATH variable, set it to C:/Program Files/Git/bin/git.exe.

I had an issue once with git pane in RStudio but because the git.exe file path was not understood by RStudio (it was in My documents folder and it does not played well with RStudio). However your not in that case.

I would try a clean config with PATH env and RStudio Global Option sets to C:/Program Files/Git/bin/git.exe.

Do not have other idea after that.


#7

I changed the RStudio option value to the path you listed, and also changed the PATH variable and made sure no other Git paths were present on the PATH variable. The system continued to behave as it did. I created a new RStudio project, and RStudio did initialize a Git repository in the directory I designated, but no Git tab or Git options appeared in the new project. I can go to the directory in Windows Explorer and use “Git Bash Here” to interact with that repository or any of the other repositories I had. The Git Bash window does continue to display the “MINGW64” between the computer name and the start of the directory path. That may be new with the most recent version of Git, I never paid attention to it before.

Thanks for your help, maybe someone else will have another idea.


#8

What Git executable have you instructed RStudio to use? In general, you should prefer telling RStudio to use either of the copies available at:

  • C:/Program Files/Git/bin/git.exe
  • C:/Program Files/Git/cmd/git.exe

If you make that change, does the issue still persist?


#9

Kevin,

I assume your are talking about the Git path setting in RStudio global options. I just set it to use bin/git.exe earlier today. I am pretty sure I tried cmd/git.exe last week at one point. What would be really helpful would be instructions on how to capture the contents of the windows that pop up when RStudio starts. Some of them I can read (I think), and they just display the Git version, I think. There is another one that has a longer message and may be the key to solving this.


#10

The windows you’re seeing are most likely RStudio attempting to launch git to perform some introspection on the project (e.g. call git status). However, those windows normally shouldn’t show up so I’m a bit confused as to why they’re popping in.

If you have some software for screencasting (recording a desktop session) you could try using that to record what happens when you launch RStudio, and hopefully you could then pause the recorded frames to see what is actually printed on those windows.

The other thing you might trying – if you open your Git shell and navigate to your project folder, what does e.g. git status return – does that run successfully?


#11

I will investigate some way to record what’s on my screen.

The Git repositories created by RStudio over the past couple years remain in the various directories. I can navigate to a folder with Windows Explorer and launch Git Bash or Git Gui from the right-click pop-up menu. Those appear to function normally. I can stage and commit tracked files. I am a solo “developer”, so at work I don’t make use of remote repositories, and never push or pull. But the few Git commands I’m accustomed to using, I am still able to use. I’d just prefer to go back to using them within RStudio.


#12

I was able to record my screen while opening an RStudio project with a Git repository that I have been using for a couple of years. A few seconds after the RStudio window appears, this blank window pops up and then disappears:

A few seconds later, this window appears then disappears:

A few seconds after that, this window appears then disappears:

That is the path to the file folder with the .Rproj file, the Git repo, and all the rest of the project’s files.

A few seconds after that, this window appears then disappears:

That’s all the action for about 30 seconds, and then the windows with the Git version and the message about the unrecognized program appear and disappear in very rapid succession.

Finally, when I go in Windows Explorer to that folder and invoke “Git Bash Here” via the right-click menu, and run “git status”, this is the result:

The prompt is my computer’s name, the mysterious “MINGW64” designation, which does correspond to a directory name under the Git directory, and then the folder path, followed by the branch name. The repositories all seem to behave as expected using Git Bash or Git Gui.