如何将本地 RStudio 项目上传到 Github,包括提交历史记录?
How to upload local RStudio Project to Github including commit history?
我有一个具有 git 提交历史记录的 RStudio 项目。
我想上传这个项目,包括。 git 提交历史到 Github 并查看 Github 上的提交历史。
我可以在 Github 上创建一个新的存储库并从 RStudio 提交,但这不包括
我在本地的过去提交。
我尝试了什么:
- 我可以上传 RStudio 项目/包。但是(全部?)git 文件位于隐藏文件夹中(OS:Windows 10),我无法将此隐藏文件夹上传到 Github(收到警告/错误留言 "This file is hidden").
- 已浏览 https://happygitwithr.com/rstudio-git-github.html
使用“终端”选项卡将您的 GitHub url 添加到遥控器,然后推送。 https://articles.assembla.com/en/articles/1136998-how-to-add-a-new-remote-to-your-git-repo
您只需要:
- 向您的本地存储库添加一个引用新(空)GitHub 存储库的来源
- 推送
即:
git remote add origin https://github.com/<you>/<newRepo>
git push -u origin master
# or
git push --mirror
我有一个具有 git 提交历史记录的 RStudio 项目。 我想上传这个项目,包括。 git 提交历史到 Github 并查看 Github 上的提交历史。
我可以在 Github 上创建一个新的存储库并从 RStudio 提交,但这不包括 我在本地的过去提交。
我尝试了什么:
- 我可以上传 RStudio 项目/包。但是(全部?)git 文件位于隐藏文件夹中(OS:Windows 10),我无法将此隐藏文件夹上传到 Github(收到警告/错误留言 "This file is hidden").
- 已浏览 https://happygitwithr.com/rstudio-git-github.html
使用“终端”选项卡将您的 GitHub url 添加到遥控器,然后推送。 https://articles.assembla.com/en/articles/1136998-how-to-add-a-new-remote-to-your-git-repo
您只需要:
- 向您的本地存储库添加一个引用新(空)GitHub 存储库的来源
- 推送
即:
git remote add origin https://github.com/<you>/<newRepo>
git push -u origin master
# or
git push --mirror