git - 通过 Git 将更改发送到云时出错
问题描述
我第一次尝试上传我的本地项目,当我执行$git push
命令时返回以下错误:
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin master
应用提示后返回错误:
Warning: Permanently added the RSA host key for IP address '---------------' to the list of known hosts.
To github.com:LuisMatheus-dev/Gama-Academy.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'git@github.com: LuisMatheus-dev / Gama-Academy.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
我应该如何进行?
解决方案
远程 master 包含本地 master 没有的提交。也许这个答案有帮助。
推荐阅读
- java - 尝试替换 JTable 中的布尔复选框渲染器/编辑器
- python - 检测白色物体的轮廓
- c++ - 使用 addch 获得意想不到的角色
- angular - Angular 7 - 正确地将数据传递给子组件
- parsing - 无法为非 LR 语法找到 first() 和 follow()
- c# - 如何从 Azure Web App 本地存储中删除文件?
- geometry - 圆圈进度默认为 85,但输出显示 0
- python-3.x - 当我的代码需要提示输入并提供正确或不正确的百分比时,它返回一个空白值
- c# - TIFF 如何有序地放置图像
- python - 使用谷歌模块地图时的语法错误