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

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

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

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

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

解决方案:

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

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

问题解决!!!

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

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. 为什么MOBA、“吃鸡”游戏不推荐用tcp协议——实测数据

    欢迎大家前往云加社区,获取更多腾讯海量技术实践干货哦~ 作者:腾讯云游戏行业资深架构师 余国良 MOBA类和"吃鸡"游戏为什么对网络延迟要求高? 我们知道,不同类型的游戏因为玩法. ...

  2. github上搜索资源

    1.进入官网 点击Explore 2.点击Trending 3.资源都在这上面,可以根据语言分类 4.搜索链接 https://github.com/trending

  3. 【Hdu2089】不要62(数位DP)

    Description 题目大意:给定区间[n,m],求在n到m中没有"62"或"4"的数的个数. 如62315包含62,88914包含4,这两个数都是不合法的 ...

  4. 谈谈对Python的感想

    写在前面 我用Python已经好几年了,最早学习用Python还是因为对人工神经网络感兴趣,python有个很好用的ANN库neurolab.本人其实也算初学者,充其量算入门了吧,写这篇一来回顾自己所 ...

  5. vue2 vue-rout

    vue 2.0的路由比起1.0简单了许多,分为以下几个步骤: 1.创建路由块和视图块: to里面是要切换的路径名称 <div id="app"> <div> ...

  6. MYSQL忘记root密码后如何修改

    方法1: 用SET PASSWORD命令 首先登录MySQL. 格式:mysql> set password for 用户名@localhost = password('新密码'); 例子:my ...

  7. String源码图

    String StringBuffer StringBuilder 均为对字符数组的操作. 实现了不同的接口,导致不同的覆写. 实现了同样的接口,适应不同的场景.

  8. Handwritten Parsers & Lexers in Go (Gopher Academy Blog)

    Handwritten Parsers & Lexers in Go (原文地址  https://blog.gopheracademy.com/advent-2014/parsers-lex ...

  9. Macaca自动化工具之uirecorder脚本录制

    UI Recorder功能介绍 支持所有用户行为: 键盘事件, 鼠标事件, alert, 文件上传, 拖放, svg, shadow dom 支持无线native app录制, 基于macaca实现: ...

  10. WebSocket协议:5分钟从入门到精通

    一.内容概览 WebSocket的出现,使得浏览器具备了实时双向通信的能力.本文由浅入深,介绍了WebSocket如何建立连接.交换数据的细节,以及数据帧的格式.此外,还简要介绍了针对WebSocke ...