git更新:Your local changes to the following files would be overwritten by merge

Posted 柳鲲鹏

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git更新:Your local changes to the following files would be overwritten by merge相关的知识,希望对你有一定的参考价值。

  • 具体错误
error: Your local changes to the following files would be overwritten by merge:
        src/sfnt/ttcolr.c
Please commit your changes or stash them before you merge.
Aborting
  • 解决办法一:放弃修改
# 丢弃所有本地未提交的修改
git checkout .
  • 解决办法二:暂存
# 暂存到堆栈区
git stash

# 查看stash内容
git stash list

以上是关于git更新:Your local changes to the following files would be overwritten by merge的主要内容,如果未能解决你的问题,请参考以下文章

git pull 报错 error: Your local changes to the following files would be overwritten by merge

git pull遇到错误:error: Your local changes to the following files would be overwritten by merge:

git 解决 Your local changes to the following files would be overwritten by merge:

git 常见冲突—— git pull遇到报错Your local changes to the following files would be overwritten by merge

git解决Your local changes would be overwritten by merge

git pull error: Your local changes to the following files would be overwritten by merge