本来想把本地项目上传GitHub一下,打开gitbash,

git init

之前配置过了 用户名和邮箱以及ssh等

$ git remote add origin https://github.com/ljt1018168/Myturn.js.git

建立连接;

git add .

git commit –m '20190101'

然后git push origin master 没有问题吧,我也觉得没有问题

然而额

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 t he remote changes

hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

意思就是先让我pull下,

那我就 git pull origin master

$ git pull origin master

From https://github.com/ljt1018168/Myturn.js

* branch master -> FETCH_HEAD

fatal: refusing to merge unrelated histories

什么玩意拒绝合并?

好吧继续git保护措施防止你合并了不同的仓库。

强制一下:git pull origin master --allow-unrelated-histories

 

git push origin master就能ok啦

 

文章来源:刘俊涛的博客

欢迎关注,有问题一起学习欢迎留言、评论

好久不git这么多问题的更多相关文章

  1. Git简略教程

    Git使用教程 厂里大部分后端应用的版本控制工具为SVN,前端代码则更习惯于Git,好久不用Git有些生疏,复习一下,效率就是生命. 1.拉取远程分支到本地 git clone + 代码地址 + 分支 ...

  2. 【ASK】git使用中出现Permission denied (publickey).

    好久没有用git了,今天突然执行了一下 $git submodule update --init --recursive =============================== 结果出现如下提 ...

  3. Git基本使用及工具

    好久没用git管理代码了,最近忙着要实习,一直在看面试题,后天入职了,就提前再复习一下git吧. git比较方便的两个网站,如果你想逼格高就用GitHub(https://github.com/),如 ...

  4. Opencv Linux环境搭建

    注:此篇博客最后没有在linux搭建成功Opencv,请移步:http://blog.csdn.net/tanhngbo/article/details/40403885 来查看成功的搭建. 另外,这 ...

  5. linux系统下使用流行的版本管理工具 Git

    前几天被版本管理困扰了好久,主要是因为 没法回到之前的版本,新版本又出了问题真的很尴尬. 终于决定使用目前网上很火的版本管理工具-------Git 历史啥的就不说了,说些有用的. 我用的是oschi ...

  6. 【自然框架】终于把源码弄到git上了。

    好久没写博客了,发现又从左面的排名里掉出去了. 说来惭愧,一直说是开源,但是源码一直没能放到git里面.原因是,不会用. 最近终于把git弄明白了.把源码都放进去了. 刚兴趣的话可以来看看. http ...

  7. Windows下配置Git服务器和客户端 超全

    为了配合Redmine使用,特地用Git来做版本控制. Git Candy© 是一个基于ASP.NET MVC的Git分布式版本控制平台,Git Candy的目标是轻松干掉Bonobo,逐渐追赶Git ...

  8. GIT@OSC中托管Android studio代码

    弄了好久,才知道如何向GIT@OSC托管代码,这里有需要的同学可以参考一下. 1.在GIT@OSC上新建一个工程 2.在AS中新建一个工程 3.在AS中选择“enable version contro ...

  9. 练习一_使用Git进行代码管理的心得

    2015年9月19日,第一次软工实践课.助教给我们介绍了git,GitHub.显而易见,我并没有听懂.所以整个上午都在找教程,一个字一个字对着敲,然后敲着敲着就出错,回宿舍,继续敲,也是一样的... ...

随机推荐

  1. 动态规划算法——最长公共子序列问题(java实现)

    已知序列X=(A,B,C,A,B,D,A)和序列Y=(B,A,D,B,A),求它们的最长公共子序列S. /* * LCSLength.java * Version 1.0.0 * Created on ...

  2. spring4 quartz2 集群动态任务

    实现定时任务的执行,而且要求定时周期是不固定的.测试地址:http://sms.reyo.cn 生产环境:nginx+tomcat+quartz2.2.1+spring4.2.1 集群. 实现功能:可 ...

  3. cannot import name 'main' 解决方案

    error description: pip3 install numpy Traceback (most recent call last): File "/usr/bin/pip3&qu ...

  4. 不越狱安装破解软件,iResign重签名方法

    http://www.baidu.com/s?wd=iresign%E8%BD%AF%E4%BB%B6&rsv_spt=1&issp=1&rsv_bp=0&ie=utf ...

  5. Guava ClassToInstanceMap

    概述 ClassToInstanceMap提供了一种是用Class作为Key, 对应实例作为Value的途径.他定义了T getInstance(Class<T>)和T putInstan ...

  6. K3C官改固件更新frp客户端

    k3c官改1.2 frpc版本是v0.13,本文介绍如何升级到最新版. 1. 下载最新版frp,发布页:https://github.com/fatedier/frp/releases选择mips版, ...

  7. 双语:Interprocess Communication 进程通信

    when one process creates a new process, the identity of the newly created process is passed to the p ...

  8. sda, sdb, sdc, sda1, sda2在Linux中都代表什么

    意义如下: 第一个软驱 /dev/fd0. 第二个软驱 /dev/fd1. 第一块硬盘 /dev/sda. 第二块硬盘 /dev/sdb, 以此类推. 第一个SCSI CD-ROM /dev/scd0 ...

  9. Centos安装FTP服务器和配置

    安装 yum install vsftpd 启动/重启/关闭 /sbin/service vsftpd start /sbin/service vsftpd restart /sbin/service ...

  10. TensorFlow (RNN)深度学习 双向LSTM(BiLSTM)+CRF 实现 sequence labeling 序列标注问题 源码下载

    http://blog.csdn.net/scotfield_msn/article/details/60339415 在TensorFlow (RNN)深度学习下 双向LSTM(BiLSTM)+CR ...