修改代码后在git pull报错:

error: Your local changes to the following files would be overwritten by merge:
xxx/xxx/xxx.js
Please, commit your changes or stash them before you can merge.
Aborting

方法一:压栈

git stash
git pull
git stash pop

方法二:回退到当前版本

git reset --hard
git pull

方法三:放弃修改过的文件

git checkout -- xxx
git pull

git pull冲突报错的更多相关文章

  1. 在使用 Git pull 时候报错 error: inflate

    在使用 Git pull 时候报错 error: inflate 具体的错误是 这样的 error: inflate: data stream error (unknown compression m ...

  2. git pull 冲突拉取不到新的代码

    本地文件已经有冲突或者在pull的过程中拉取的文件和本地文件冲突时,拉取不到新的代码,git pull出现报错,如下: 这个时候,如果你有两种选择,如果你需要这些改动,那个你就需要手动解决冲突,然后a ...

  3. git同步遇到报错

    git同步遇到报错 “fatal: unable to access ‘https://github.com/ruanwenwu/newp.git/‘: Peer reports incompatib ...

  4. git https 请求报错 504

    git https 请求报错 504 原因可能是因为设置了代理,ubuntu/deepin 系统可以检查 /etc/profile ~/.bashrc 内有没有设置 https 的代理. 有的话,去掉 ...

  5. git切换分支报错:error: pathspec 'origin/XXX' did not match any file(s) known to git

    项目上有一个分支test,使用git branch -a看不到该远程分支,直接使用命令git checkout test报错如下: error: pathspec 'origin/test' did ...

  6. git同步遇到报错“fatal: unable to access 'https://github.com/lizhong24/mysite2.git/': Peer reports incompatible or unsupported protocol version.”

    git同步遇到报错“fatal: unable to access 'https://github.com/lizhong24/mysite2.git/': Peer reports incompat ...

  7. git提交代码报错 trailing whitespace的解决方法

    1. git提交代码报错 trailing whitespace 禁止执行pre-commit脚本 进入到项目目录中 chmod a-x .git/hooks/pre-commit 2.git提交代码 ...

  8. Git提交代码报错Git push error:src refspec XXX matches more than one解决方案

    Git提交代码push时,报错这个 error: src refspec master matches more than one. error: failed to push some refs t ...

  9. git statsh命令报错解决

    git stash命令主要用于当在一个分支的开发工作未完成,却又要切换到另外一个分支进行开发的时候,除了commit原分支的代码改动的方法外,提供暂存代码的方式. git stash命令参考这篇:ht ...

随机推荐

  1. C# 小球100米自由落下

    //一球从N 米高自由落下,每次落地后反跳回原高度的一般:再录下,求它在第十次落地时,共经过多少米?第10次反弹多高 static string ballDsitance(float height1, ...

  2. k8s(未完待续)

    K8s简介Kubernetes(k8s)是自动化容器操作的开源平台,这些操作包括部署,调度和节点集群间扩展. 使用Kubernetes可以  自动化容器的部署和复制  随时扩展或收缩容器规模  将容器 ...

  3. python参数传递:对象的引用

    大家都知道在python中,一切皆对象,变量也不再具有类型,变量仅仅是对象的一个引用,我们通常用变量来测类型,通常测得就是被这个变量引用得对象的类型. python采用的是传递对象的引用,为了方便说明 ...

  4. WebApplicationContext wac=WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());这句话的意思

    在jsp中出现 提取的代码: <%   WebApplicationContext wac = WebApplicationContextUtils     .getWebApplication ...

  5. C# 使用List<T> 内存溢出

    class Program    {        static void Main(string[] args)        {            var all = new List< ...

  6. 富文本的一般处理方式,document.getElementById('富文本的ID').contentWindow.document.body.innerHTML = '%s'" %(content)

    如果套不出来,去问前端开发帮忙吧 哈哈

  7. css文章

    前端HTML-CSS规范:https://yq.aliyun.com/articles/51487 jQuery+d3绘制流程图:https://blog.csdn.net/zitong_ccnu/a ...

  8. POJ1358 Agri-Net

    题目链接 就是裸的最小生成树,复习一下. prim算法: G=(V,E),V是点集,E是边集 假设T=(U,TE)是最小生成树.U,TE初始化为空 首先从V中任取一点 假设取V1,然后U={V1},只 ...

  9. javascript的代码块

    a block of code 注意到这个问题是在看书的时候,中文版中出现“代码片段”这样的词语,于是就去翻看了英文版的原书.书中的用了a block of code,难道不应该翻译成代码块吗?(作为 ...

  10. js中的slice和splic

    一:slice 的用法 slice() 用于数组方法可从已有的数组中返回选定的元素,也就是在该方法中指定的元素.该方法不会改变原数组,,返回值是一个新的数组. 选取的范围是 从 当前位(0) 开始(索 ...