【问题标题】:How to upload local RStudio Project to Github including commit history?如何将本地 RStudio 项目上传到 Github,包括提交历史记录?
【发布时间】:2020-07-16 07:13:45
【问题描述】:

我有一个具有 git 提交历史的 RStudio 项目。 我想上传这个项目,包括。将 git 提交历史记录到 Github,并在 Github 上查看提交历史记录。

我可以在 Github 上创建一个新的 repo 并从 RStudio 提交,但这不包括 我在本地的过去提交。

我尝试了什么:

  • 我可以上传 RStudio 项目/包。但是(全部?) git 文件位于隐藏文件夹(操作系统:Windows 10)中,我无法将此隐藏文件夹上传到 Github(收到警告/错误消息“此文件已隐藏”)。
  • 浏览过https://happygitwithr.com/rstudio-git-github.html

【问题讨论】:

    标签: r git github rstudio


    【解决方案1】:

    您只需要:

    • 向本地存储库添加引用新(空)GitHub 存储库的源

    即:

    git remote add origin https://github.com/<you>/<newRepo>
    git push -u origin master
    # or
    git push --mirror
    

    【讨论】:

      【解决方案2】:

      使用终端选项卡将您的 GitHub 网址添加到远程,然后推送。 https://articles.assembla.com/en/articles/1136998-how-to-add-a-new-remote-to-your-git-repo

      【讨论】:

        猜你喜欢
        • 2018-11-04
        • 2021-01-06
        • 2012-04-06
        • 1970-01-01
        • 2023-01-22
        • 2014-10-05
        • 2017-01-03
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多