gpt4 book ai didi

r - 在 Windows 上安装 git 后,RStudio 中缺少 Git 选项卡

转载 作者:行者123 更新时间:2023-12-04 12:44:18 29 4
gpt4 key购买 nike

安装了 R、R Studio、Git,但是当我打开 R Studio 时,没有 Git 选项卡,

喜欢下面的截图:
enter image description here
Windows 8.1,x64
R版本:3.5.1
R Studio 版本:1.1.463
混帐:2.19.2

当我打开工具/全局选项/GitSVN 时:
Git 可执行文件:C:/Program Files/Git/bin/git.exe
SVN 可执行文件:C:/Program Files/Git/bin/sh.exe
* 我在 git 文件夹中找不到任何名为“svn.exe”的文件。

我尝试通过以下方法解决问题,但均无效:
1. 在 R Studio 中运行 Sys.which("git") 后,输出为:
"C:\\PROGRA~1\\Git\\cmd\\git.exe",所以我尝试将 git 可执行文件更改为 cmd/git 而不是 bin/git,不工作。
2.重新安装一切,没有成功。
3. 尝试了旧版 Git 2.14 但仍然没有成功。

谁能帮我解决这个问题?谢谢!

最佳答案

为了在 RStudio 的右上 Pane 中看到 Git 选项卡,必须创建一个 RStudio 项目,如下所示。

从 RStudio 主面板开始,在加载项目之前没有 git 选项卡

enter image description here

从主菜单栏中选择文件>新建项目来创建一个项目

enter image description here

在出现的对话框中选择新建目录

enter image description here

接下来,填写新的项目信息,勾选create git repository复选框,点击Create Project按钮。

enter image description here

创建项目后,Git 选项卡现在会显示在 RStudio 的右上象限中。

enter image description here

另见 Version Control with Git and SVN在 RStudio 支持网站上。

关于r - 在 Windows 上安装 git 后,RStudio 中缺少 Git 选项卡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53462058/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com