你怎么git获取然后合并? “错误:对以下文件的本地更改将被合并覆盖” [英] How do you git fetch then merge? "Error: Your local changes to the following files would be overwritten by merge"
本文介绍了你怎么git获取然后合并? “错误:对以下文件的本地更改将被合并覆盖”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您可以在合并之前提交更改,或者你把它们藏起来:
git stash
git merge origin / master
git stash pop
Newbie Git question: I have a repo set up on bitbucket. I git fetched someone else's changes and would like to merge them with my own. However, when I try to git merge (or git merge origin/master), I get the message "error: Your local changes to the following files would be overwritten by merge:", and then a list of files I've changed. Having Git merge these changes is exactly what I want to do though.
解决方案
You can either commit your changes before you do the merge, or you stash them:
git stash
git merge origin/master
git stash pop
这篇关于你怎么git获取然后合并? “错误:对以下文件的本地更改将被合并覆盖”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文