git - Github尝试上传文件并获取一系列错误
问题描述
我正在使用 RStudio,并且我想使用带有 RStudio 的 shell 访问上传许多文件。
我打开我的项目并选择 Git/SVN(在 RStudio 项目选项中)。
原点设置在:git@github.com:msmith01/master_msmith01.github.io.git
我想上传我的所有文件:
> getwd()
[1] "C:/Users/Matt/Documents/msmith01.github.io"
我有以下内容:
> list.files()
[1] "~$tup Academic site.docx" "="
[3] "config" "config.toml"
[5] "content" "index.Rmd"
[7] "msmith01.github.io.Rproj" "public"
[9] "resources" "Setup Academic site.docx"
[11] "static" "themes"
在我运行的 shell 访问中:
PATH=$PATH” C:\Program Files\Git\cmd”
git add .
然后我运行:
git commit -m "myNewUpload"
On branch master
Your branch and 'origin/master' have diverged,
and have 6 and 5 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
nothing to commit, working tree clean
跑步
git pull
我输入一些访问代码并得到以下信息:
Enter passphrase for key '/c/Users/Matt/Documents/msmith01.github.io/=/.ssh/id_rsa':
fatal: refusing to merge unrelated histories
这些文件应替换https://github.com/msmith01/master_msmith01.github.io中的文件
问题是,我上次提交这个 repo 是在 5 个月前,从那以后我做了重大改变,因此我不明白这个错误nothing to commit, working tree clean
解决方案
推荐阅读
- python - 如何为“Nonetype”函数赋值?
- c - 为什么我在尝试对链表进行操作时收到“addresssanitizer 致命信号”?
- c# - IdentityServer4 无法使用自定义用户存储添加 asp net core 身份
- javascript - 顶行菜单 CSS
- elasticsearch - 是否存在索引中任何属性的存在方法
- python-3.x - 将 PrettyTable 数据打印到 QPlainTextEdit
- java - Java 11 Springboot 框架中更好的 API 构建的见解和解决方案
- google-apps-script - 使用 Google App Script 和 Google Sheet 的自定义功能获取所有选项卡名称
- asp.net - vscode中如何使用aspnet-codegenerator工具搭建脚手架
- apache - 通过 nginx 使用 SSL 终止时的 Apache 到 Tomcat Cookie 问题