error: failed to push some refs to 'https://github.com/Qtoken/......'

1. 问题描述:执行命令:git push origin master    将git仓库项目 添加到github非空仓库报错

2.返回内容:

error: failed to push some refs to 'https://github.com/Qtoken/......'

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.

3.原因:  git仓库与远程连接的github库,内容不一致

4.解决方法:

4.1 执行 git pull --rebase origin master    将github仓库内容同步到git仓库

4.2 再执行git push origin master     此时git仓库项目正常 添加到github非空仓库

解决git仓库项目 添加到github非空仓库冲突问题 error: failed to push some refs to 'https://github.com/Qtoken/......'的更多相关文章

  1. 错误:error: failed to push some refs to 'https://github.com/pzq7025/KG.git'的解决办法

    一.问题在进行[git push orgin master]的时候出现如下错误 ! [rejected] master -> master (non-fast-forward) error: f ...

  2. git 解决 error: failed to push some refs to 'https://github.com/xxxx.git'

    在github远程创建仓库后, 利用gitbash进行提交本地文件的时候出现如下错误 [root@foundation38 demo]# git push -u origin master Usern ...

  3. git 报错:error: failed to push some refs to 'https://github.com/Anderson-An/******.git'(已解决)

    提交push 报错: $ git push origin masterTo https://github.com/Anderson-An/******.git ! [rejected] master ...

  4. git push ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/Operater9/guest' hint: Updates were rejected because the tip of your current bra

    推送本地代码到github报错 git push报错 ! [rejected] master -> master (non-fast-forward) error: failed to push ...

  5. error: failed to push some refs to 'https://github.com/username/python.git'

    解决error: failed to push some refs to 'https://github.com/bluepen/python.git' 当我们在使用git工具上传我们自己的代码时,可 ...

  6. 【错误】上传新的项目出错 error: failed to push some refs to 'https://github.com/...

    问题描述:在git bash中键入 $ git push origin master 进行提交的时候出现 如下错误: error: failed to push some refs to 'https ...

  7. git 本地推送远程仓库报错: error: failed to push some refs to 'https://github.com/yangtuothink/mxonline.git'

    报错现象 添加远程仓库后 推送代码的时候报错 报错分析 远程代码和本地代码不匹配问题 远程初始仓库的创建有些默认 的 README什么的本地是没有的 需要先同步后再上传 报错解决 git push - ...

  8. git上传文件夹报错: ! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://github.com/taminachen/rjxm.git' hint: Updates were rejected because the remote contains work

    使用git上传本地文件夹到远程仓库,使用如下命令:git push -u origin master时报错 原因是在GitHub创建仓库时创建了readme文件,但是本地没有这个文件,造成本地目录与远 ...

  9. git/github error: failed to push some refs to 'https://github.com/shenhaha/cloudletter.git'

    git 提交代码到github上报如下错误 报错分析: 解决方法: 关闭这两个设置 再次提交代码 success

  10. 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. ubuntu iptables 做为路由转发

    实现功能,本地服务器的号段的192.168.8.0/24,而做为路由器的机器有2个ip,192.168.8.x和另一个ip,而另一个ip可以访问 192.168.2.0/24号段, 为了让其它192. ...

  2. Java注解及应用原理

    视频地址:https://www.bilibili.com/video/BV1Py4y1Y77P/?spm_id_from=333.337.search-card.all.click&vd_s ...

  3. C++ primer笔记 -标准库类型

    最重要的两个标准库类型:string和vector string 类型的输入操作符: 1.读取并忽略开头所有的空白符 2.读取字符直至再次遇到空白字符,读取终止 string对象的基本操作: stri ...

  4. Vue 更改数组中的值,页面不刷新问题。解决方法+原理说明

    一.Vue 更改数组中的值,页面不刷新问题 data{ hobby:["打游戏","想静静","发呆"] } 1.错误写法(页面不刷新): ...

  5. 51nod1355

    没啥意思的板子题. 首先,众所周知, \[\gcd\{f_a,f_b\}=f_{\gcd\{a,b\}} \] 所以考虑将 \(\operatorname{lcm}\) 转化为 \(\gcd\). \ ...

  6. 5.docker安装redis

    下载redis镜像 不讲那么细了,可以参考docker安装mysql的介绍 docker pull redis 不加冒号和版本表示下载最新版本的 镜像下载完后可以数据 docker images 命令 ...

  7. vue3 vite等笔记

    1.脚手架 vue-cli基于webpack封装,生态非常强大,可配置性也非常高,几乎能够满足前端工程化的所有要求.缺点就是配置复杂,甚至有公司有专门的webpack工程师专门做配置,另外就是webp ...

  8. centos7 七步教你安装搭建 LAMP 服务

    先说说LAMP是什么 LAMP是指一组通常一起使用来运行动态网站或者服务器的自由软件名称首字母缩写: Linux,操作系统 Apache,网页服务器 MariaDB或MySQL,数据库管理系统(或者数 ...

  9. ie8 不支持 trim方法

    那就自己写一个trim()  String.prototype.trim = function() {                 return this.replace(/(^\s*)|(\s* ...

  10. setAttribute动态添加

    btnDel.setAttribute('type', 'button'); //type="button" btnDel.setAttribute('value', '删除'); ...