码迷,mamicode.com
首页 > Windows程序 > 详细

git pull 提示错误,Your local changes to the following files would be overwritten by merge

时间:2019-05-28 14:16:14      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:本地   image   pull   please   工作   master   har   info   ase   

error: Your local changes to the following files would be overwritten by merge:
       
Please commit your changes or stash them before you merge.

解决办法:
1、服务器代码合并本地代码

$ git stash     //暂存当前正在进行的工作。
$ git pull   origin master //拉取服务器的代码
$ git stash pop //合并暂存的代码

2、服务器代码覆盖本地代码

$git reset --hard  //回滚到上一个版本
$git pull origin master 

技术图片
技术图片
技术图片
技术图片

git pull 提示错误,Your local changes to the following files would be overwritten by merge

标签:本地   image   pull   please   工作   master   har   info   ase   

原文地址:https://www.cnblogs.com/smart-girl/p/10936878.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!