git pull出错

来源:互联网 发布:c语言超市商品管理系统 编辑:程序博客网 时间:2024/06/08 06:11
错误信息:
Enter passphrase for key '/c/Users/Administrator/.ssh/id_rsa':
error: Your local changes to the following files would be overwritten by merge:
        sports-nba/src/main/java/com/judong/scrapy/job/GameScheduleController.java
        sports-nba/src/main/resources/templates/GameSchduleAjax.html
Please commit your changes or stash them before you merge.
Aborting

Updating a9b5f23..1b29c3f


解决办法:

1、git stash: 备份当前的工作区的内容,从最近的一次提交中读取相关内容,让工作区保证和上次提交的内容一致。同时,将当前的工作区内容保存到Git栈中。

2、git pull

3、git stash pop:从Git栈中读取最近一次保存的内容,恢复工作区的相关内容。由于可能存在多个Stash的内容,所以用栈来管理,pop会从最近的一个stash中读取内容并恢复。


原创粉丝点击