如何忽略'git pull'上关于我的本地更改将被合并覆盖的错误? [英] How do I ignore an error on 'git pull' about my local changes would be overwritten by merge?
本文介绍了如何忽略'git pull'上关于我的本地更改将被合并覆盖的错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在Git pull上忽略以下错误消息?
以下文件的本地更改将被merge
如果我要覆盖它们,该怎么办?
我尝试过一些类似于 git pull -f
的东西,但没有任何效果。
只想覆盖特定的变化,而不是所有的变化。
解决方案
好吧,在我提出的其他两个答案的帮助下一个直接的解决方案:
$ g $ g $ g $ check $ git checkout HEAD ^ file / to /覆盖
git pull
How do I ignore the following error message on Git pull?
Your local changes to the following files would be overwritten by merge
What if I want to overwrite them?
I've tried things like git pull -f
, but nothing works.
To be clear, I only want to overwrite specific changes, not everything.
解决方案
Alright with the help of the other two answers I've come up with a direct solution:
git checkout HEAD^ file/to/overwrite
git pull
这篇关于如何忽略'git pull'上关于我的本地更改将被合并覆盖的错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文