Updates were rejected because the remote contains work that you do(git报错解决方案)

时间:2022-01-06 00:30:46

Updates were rejected because the remote contains work that you do(git报错解决方案)

今天向GitHub远程仓库提交本地项目文件时,遇到了下列错误,很是郁闷

看报错原因是我在远程做了改动

额,想起来了,昨天刚在这个项目对应的远程仓库修改了README文件

起初以为没有指定远程仓库,尝试了如下命令但还是不行

Updates were rejected because the remote contains work that you do(git报错解决方案)

解决方案:

执行 git pull 远程分支名 本地分支名

再执行git push命令,没有报错

Updates were rejected because the remote contains work that you do(git报错解决方案)

问题解决!!!

欢迎转载,博主原创,转载请注明来源,谢谢!!!

Updates were rejected because the remote contains work that you do(git报错解决方案)的更多相关文章

  1. Updates were rejected because the remote contains work that you do(gitee报错解决方案)

    今天向Gitee远程仓库提交本地项目文件时,遇到了下列错误,很是郁闷 正在推送 1203笔记本Error: failed to push some refs to 'https://gitee.com ...

  2. Git error: hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused b

    hint: Updates were rejected because the remote contains work that you dohint: not have locally. This ...

  3. Git error: hint: Updates were rejected because the remote contains work that you do hint: not have locally

    hint: Updates were rejected because the remote contains work that you dohint: not have locally. This ...

  4. 【gitlab】首次提交本次代码到gitlab上,报错:Updates were rejected because the remote contains work that you do

    首次提交本次代码到gitlab上,报错:Updates were rejected because the remote contains work that you do 报错情况如下: 错误原因: ...

  5. git报错:'fatal:remote origin already exists

    git报错:'fatal:remote origin already exists'怎么处理?附上git常用操作以及说明.   git添加远程库的时候有可能出现如下的错误, 怎么解决? 只要两步: 1 ...

  6. Git 报错:Updates were rejected because the tip of your current branch is behind

    刚开始学习 git 命令,发现会出现很多的错误,所以就总结下出现的错误,以此来加深理解和掌握吧! 环境:在本地库操作了一系列的 add 和 commit 操作后,想把本地仓库推送到远端,但是发生以下错 ...

  7. Updates were rejected because the remote contains work that you do

    每次建立新的仓库,提交的时总会出现这样的错误,真是头疼,...... 直接开始正题,git 提交的步骤: 1. git init //初始化仓库 2. git add .(文件name) //添加文件 ...

  8. 报错 hint: Updates were rejected because the remote contains work that you do 解决方法

    1. git pull origin master --allow-unrelated-histories 2.git pull origin master 3.git init 4.git remo ...

  9. error: failed to push some refs to 'https://github.com/github账号/learn_git.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caus

    在使用git 对源代码进行push到gitHub时可能会出错,信息如下   此时很多人会尝试下面的命令把当前分支代码上传到master分支上. $ git push -u origin master ...

随机推荐

  1. 第三次作业——for 语句及分支结构else-if

    1.本次学习到的知识点: (1)else-if的一般形式:if(表达式1)语句1:else if(表达式2)语句2:........else if(表达式n-1)语句n-1:else语句n: (2)遇 ...

  2. blogilo在chinaunix发布博客的设置

    1. 在日志类型菜单中选择"Metaweblog API". 2. 在日志的远程发布url中输入"http://blog.chinaunix.net/xmlrpc.php ...

  3. Scala控制抽象

    private def filesHere = (new java.io.File(".")).listFiles() def filesEnding(query: String) ...

  4. 消息系统Kafka介绍

    1.  概述 Kafka是Linkedin于2010年12月份开源的消息系统,它主要用于处理活跃的流式数 据.活跃的流式数据在web网站应用中非常常见,这 些数据包括网站的pv.用户访问了什么内容,搜 ...

  5. leetcode String to Integer (atoi) python

    class Solution(object): def myAtoi(self, str): """ :type str: str :rtype: int "& ...

  6. 将EditPad Lite 加入鼠标右键

    > 开始 > regedit 如图新建shell及command

  7. 学习大数据基础框架hadoop需要什么基础

    什么是大数据?进入本世纪以来,尤其是2010年之后,随着互联网特别是移动互联网的发展,数据的增长呈爆炸趋势,已经很难估计全世界的电子设备中存储的数据到底有多少,描述数据系统的数据量的计量单位从MB(1 ...

  8. Web Api跨域访问配置及调用示例

    1.Web Api跨域访问配置. 在Web.config中的system.webServer内添加以下代码: <httpProtocol> <customHeaders> &l ...

  9. PHP之旅5 php的函数

    函数的结构 php的函数和其他语言的函数基本类似,和C语言比较的话主要区别在于php是一个弱语言,对类型不敏感,在函数的表现上就是,php函数没有类型定义,不像语言即使无参也要定义为void,而且不管 ...

  10. python json&period;dumps中文乱码

    json.dumps在默认情况下,对于非ascii字符生成的是相对应的字符编码,而非原始字符,例如: >>> import json>>> js = json.lo ...