自己简直就是一个git小白,碰到问题,一点点的解决吧,可能不太系统,但也只能勤能补拙了

Git本地有修改如何强制更新

本地有修改和提交,如何强制用远程的库更新更新。我尝试过用git pull -f,总是提示 You have not concluded your merge. (MERGE_HEAD exists)。

我需要放弃本地的修改,用远程的库的内容就可以,应该如何做?傻傻地办法就是用心的目录重新clone一个,正确的做法是什么?

正确的做法应该是:

git fetch --all
git reset --hard origin/master

git fetch 只是下载远程的库的内容,不做任何的合并git reset 把HEAD指向刚刚下载的最新的版本

参考链接:

http://stackoverflow.com/questions/1125968/force-git-to-overwrite-local-files-on-pull

You have not concluded your merge. (MERGE_HEAD exists)。(转)的更多相关文章

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

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

  2. ou have not concluded your merge (MERGE_HEAD exists)

    今天获取git线上仓库代码报了这个错误: zhangzhi@moke:~/code/ktsg-api$ git pull You have not concluded your merge (MERG ...

  3. 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 ...

  4. You have not concluded your merge. (MERGE_HEAD exists)(转)

    Git本地有修改如何强制更新 本地有修改和提交,如何强制用远程的库更新更新.我尝试过用git pull -f,总是提示 You have not concluded your merge. (MERG ...

  5. 解决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 ...

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

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

  7. [转]解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).

    Git fetch和git pull的区别: 都可以从远程获取最新版本到本地 1.Git fetch:只是从远程获取最新版本到本地,不会merge(合并) $:git fetch origin mas ...

  8. 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). 解决办法一:保 ...

  9. git pull 报错 You have not concluded your merge (MERGE_HEAD exists).

    git pull时报错 解决方案:

随机推荐

  1. Axure8.0入门级基础操作到高手产品经理

    宅男下载了一个Axure8.0.从来没有用过,那就从最基础的了解一下呗. 1.添加元件,选择元件设置样式(右侧对话框中)略!!!!! 2.按住ctrl键,用鼠标点选元件,可以任意旋转3.点元件上的黑圆 ...

  2. Kafka与.net core(三)kafka操作

    1.Kafka相关知识 Broker:即Kafka的服务器,用户存储消息,Kafa集群中的一台或多台服务器统称为broker. Message消息:是通信的基本单位,每个 producer 可以向一个 ...

  3. UWP开发砸手机系列(一)—— Accessibility

    因为今天讨论的内容不属于入门系列,所以我把标题都改了.这个啥Accessibility说实话属于及其蛋疼的内容,即如何让视力有障碍的人也能通过声音来使用触屏手机……也许你这辈子也不会接触,但如果有一天 ...

  4. ubuntu emacs的安装

    在终端依次输入这三条命令即可 sudo add-apt-repository ppa:ubuntu-elisp/ppa sudo apt-get update sudo apt-get install ...

  5. 【题解】 洛谷P2340 奶牛会展

    传送门 重新开始打代码Day1 第一眼看感觉不对啊,这道题目好像空间开不下,是不是不能dp... 后来想到了一个思路,他要求的是\(dp_{i,j,k}=j+k\),然后这样子不是很奇怪吗? 直接一维 ...

  6. SUBSET

    DESCRIPTION:一开始你有一个空集,集合可以出现重复元素,然后有Q 个操作1. add s在集合中加入数字s.2. del s在集合中删除数字s.保证s 存在3. cnt s查询满足a& ...

  7. case when then end 用法

    select type,numbers,case monthst when 1 then '一月'when 2 then '二月'when 3 then '三月'else '其他月'end month ...

  8. H - Birthday Paradox (生日悖论)

    点击打开链接 Sometimes some mathematical results are hard to believe. One of the common problems is the bi ...

  9. LOJ#6047. 「雅礼集训 2017 Day10」决斗(set)

    题面 传送门 题解 这么简单一道题我考试的时候居然只打了\(40\)分暴力? 如果我们把每个点的\(a_i\)记为\(deg_i-1\),其中\(deg_i\)表示有\(deg_i\)个数的\(A_i ...

  10. SpringMvc @RequestMapping原理

    讲这个之前,我们得先知道在SpringMvc启动时,会加载所有的Bean类,就是加了@Controller,@Component等组件标识的类,然后会把@RequestMapping的方法也加入到一个 ...