Git fetch和git pull的区别:

都可以从远程获取最新版本到本地

1.Git fetch:只是从远程获取最新版本到本地,不会merge(合并)

$:git fetch origin master   //从远程的origin的master主分支上获取最新版本到origin/master分支上
$:git log -p master..origin/master //比较本地的master分支和origin/master分支的区别
$:git merge origin/master //合并

2.Git fetch:从远程获取最新版本并merge(合并)到本地

$:git pull origin master  //相当于进行了 git fetch 和 git merge两部操作

实际工作中,可能git fetch更好一些, 因为在merge前,可以根据实际情况决定是否merge


再说导致报错:error: You have not concluded your merge (MERGE_HEAD exists).的原因可能是在以前pull下来的代码自动合并失败

解决办法一:保留本地的更改,中止合并->重新合并->重新拉取

$:git merge --abort
$:git reset --merge
$:git pull

解决办法二:舍弃本地代码,远端版本覆盖本地版本(慎重)

$:git fetch --all
$:git reset --hard origin/master
$:git fetch
转自:https://www.cnblogs.com/sunnie-cc/p/8085730.html

[转]解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).的更多相关文章

  1. Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).

    Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). Git fet ...

  2. 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).

    Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). 2017年02 ...

  3. git:Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).

    Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). 解决办法一:保 ...

  4. Git常用命令及常见报错:You have not concluded your merge (MERGE_HEAD exists)、清理无效的远程追踪分支

    一.常用命令 切换到master分支:git checkout master 查看已有本地及远程分支:git branch -a(先git pull拉下全部数据) 查看远程分支:git branch ...

  5. 解决MySQL报错ERROR 2002 (HY000)【转】

    今天在为新的业务线搭架数据库后,在启动的时候报错 root@qsbilldatahis-db01:/usr/local/mysql/bin# ./mysql ERROR 2002 (HY000): C ...

  6. 解决git报错

    解决git报错:fatal: unable to access "https://github.com/.../.git/" 1.在git中执行(记得分开执行) git confi ...

  7. You have not concluded your merge (MERGE_HEAD exists) git拉取失败

    本文转自:http://yijiebuyi.com/blog/5b55eb51ad49ce41e2de9c85dd4513ca.html 今天获取git线上仓库代码报了这个错误: zhangzhi@m ...

  8. 解决git报错:error: RPC failed; curl 18 transfer closed with outstanding read data remaining 的方法

    报错信息: error: RPC failed; curl 18 transfer closed with outstanding read data remainingfatal: the remo ...

  9. git报错error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500

    报错 $ git push; Enumerating objects: 1002, done. Counting objects: 100% (1002/1002), done. Delta comp ...

随机推荐

  1. REST,以及RESTful的讲解

    详见:https://blog.csdn.net/qq_21383435/article/details/80032375 1.传统下的API接口对比规则概念REST 系统的特征演化优点&缺点 ...

  2. Eclipse上安装websphere

    Eclipse上安装websphere 参考:https://blog.csdn.net/qq_26264237/article/details/90107508 安装websphere插件 WebS ...

  3. ajax+jquery上传图片

    利用ajax进行图片上传,啥也不说了,上代码~ <input type="file" id="uploadImg"> <span  oncli ...

  4. MySQL主从复制(Centos6.3&MySQL5.6)

    环境: Master:Centos 6.3        192.168.1.4  Slave:Centos 6.3            192.168.1.5 MySQL: MySQL-5.6.2 ...

  5. DNS服务——域名解析转发 和 条件转发

    前言 有一台Linux机器作为DNS服务器,查看这台机器上的DNS文件,发现指向互联网上的DNS服务器. [root@ziqiang named]# cat /etc/resolv.conf # Ge ...

  6. microsoft office 2007 在已经安装pdf maker的情况下另存为没有adobe pdf选项

    通常,此类情况是pdf maker 插件被禁用导致,点击office 2007左上角菜单栏,选项,加载项,在管理处选择禁用项目, 找到acrobat pdf maker office com addi ...

  7. 纯js验证码

    纯js验证码 <!DOCTYPE html> <html> <head> <title>纯js验证码</title> </head&g ...

  8. element-ui upload组件 onchange事件 传自定义参数

     <el-upload     class="upload-demo"     list-type="picture"     accept=" ...

  9. Java原子类--AtomicReference

    转载请注明出处:http://www.cnblogs.com/skywang12345/p/3514623.html AtomicReference介绍和函数列表 AtomicReference是作用 ...

  10. JS闭包是什么?

    闭包是js开发惯用的技巧,什么是闭包? 闭包指的是:能够访问另一个函数作用域的变量的函数. 清晰的讲:闭包就是一个函数,这个函数能够访问其他函数的作用域中的变量. function outer(){ ...