我有一个名为 tags 的存储库,我将其重命名为 tag 。
然后我创建了一个名为 tags (第一个旧名称)的新存储库。
现在,当从R Studio提交时,两个项目都尝试提交到相同的存储库(标签)。
我通过以下项目启动了我的项目:
shell("git remote add origin https://github.com/moodymudskipper/tag.git", intern = TRUE)
shell("git push -u origin master",intern = TRUE)
和
shell("git remote add origin https://github.com/moodymudskipper/tags.git",intern = TRUE)
shell("git push -u origin master",intern = TRUE)
在此之后,我仅通过 Rstudio 的API和 usethis 函数进行了提交,对 git 的了解不多
链接到软件包:
我该如何解决呢?
答案 0 :(得分:1)
我很想将其作为答案,但是:您可以手动编辑./.git/config
文件来更新[remote ...]
部分以更改远程URL。我已经用一个空的仓库足够自信地做到了这一点...
使用grep -rli tags.git .git/*
检查标签是否存在;如果您得到的只是.git/config
,那么您就可以进行编辑并继续前进了。但是,如果找到其他文件,我不确定在继续进行git远程工作时它们是否会更新。在这种情况下,查看https://help.github.com/en/articles/changing-a-remotes-url以便正式更改URL可能会有所帮助。