"Your local changes to the following files would be overwritten by merge" on git

运行: git merge --ff origin/master

得到错误信息:

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

  dir/file1

  dir/file2

  dir/file3

 

解决办法先运行以下命令迁出远程文件:

  git checkout HEAD^ dir/

 

posted @ 2015-08-12 17:50  Waichung  阅读(502)  评论(0编辑  收藏  举报