遇一山,过一山,处处有风景;只要勇敢向前,一路尽是繁花盛开。 | (点击查看→)【测试干货】python/java自动化、持续集成、性能、测开、简历、笔试面试等

Git必知必会基础(20):踩坑汇总

 

本系列汇总,请查看这里https://www.cnblogs.com/uncleyong/p/10854115.html

问题一:push的时候报错:Permission denied (publickey)

配置ssh通信方式(https://www.cnblogs.com/uncleyong/p/17965151),或者改为https通信方式

 

问题二:本地仓库推送到远程仓库:fatal: refusing to merge unrelated histories

原因是两个库不一样,本地要推送到远端, 远端觉得这个本地库跟自己不相干, 所以告知无法合并。

解决方法:先从远端库拉下来,把本地要加入的代码放到刚刚从远端库下载到本地的库中,然后提交上去

 

问题三:git push失败

To gitee.com:qzcsbj/pytest_apiautotest.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'gitee.com:qzcsbj/pytest_apiautotest.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不是最新的

先fetch远程分支,然后合并,参考:https://www.cnblogs.com/uncleyong/p/17973817

 

问题四:error: Terminal is dumb, but EDITOR unset

意思是终端无响应,未设置EDITOR

方法一:换用git bash

方法二:执行commit

参考:https://www.cnblogs.com/uncleyong/p/17977772#_label4

 

 

 

 

 

posted @ 2019-04-08 22:01  全栈测试笔记  阅读(2504)  评论(0编辑  收藏  举报
浏览器标题切换
浏览器标题切换end