使用 rstudio 和 github,重命名回购问题
with rstudio and github, issue with renamed repo
我有一个名为 tags 的存储库,我将其重命名为 tag.
然后我创建了一个名为 tags 的新存储库(第一个的旧名称)。
现在,当从 R Studio 提交时,两个项目都会尝试提交到同一个存储库 (tags)。
我开始了我的项目:
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.
软件包链接:
我该如何解决这个问题?
我犹豫是否要将此作为答案抛出,但是:您可以手动编辑 ./.git/config
文件以更新 [remote ...]
部分以更改远程 URL。我已经用一个空的 repo 自信地完成了这件事 ...
使用 grep -rli tags.git .git/*
检查标签是否存在;如果您得到的只是 .git/config
,那么您可以继续编辑并继续。但是,如果您找到其他文件,我不确定它们是否会在您继续 git 远程工作时得到更新。在这种情况下,查看 https://help.github.com/en/articles/changing-a-remotes-url 以便 正式 更改 URL.
可能会有所帮助
我有一个名为 tags 的存储库,我将其重命名为 tag.
然后我创建了一个名为 tags 的新存储库(第一个的旧名称)。
现在,当从 R Studio 提交时,两个项目都会尝试提交到同一个存储库 (tags)。
我开始了我的项目:
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.
软件包链接:
我该如何解决这个问题?
我犹豫是否要将此作为答案抛出,但是:您可以手动编辑 ./.git/config
文件以更新 [remote ...]
部分以更改远程 URL。我已经用一个空的 repo 自信地完成了这件事 ...
使用 grep -rli tags.git .git/*
检查标签是否存在;如果您得到的只是 .git/config
,那么您可以继续编辑并继续。但是,如果您找到其他文件,我不确定它们是否会在您继续 git 远程工作时得到更新。在这种情况下,查看 https://help.github.com/en/articles/changing-a-remotes-url 以便 正式 更改 URL.