git pull 报错 error: cannot pull with rebase: Your index contains uncommitted changes.

Posted 闭关苦炼内功

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git pull 报错 error: cannot pull with rebase: Your index contains uncommitted changes.相关的知识,希望对你有一定的参考价值。

git pull 报错
error: cannot pull with rebase: Your index contains uncommitted changes.
error: please commit or stash them.

解决办法

1、先执行
git stash

2、再执行
git pull –rebase

3、最后再执行
git stash pop


切记 git stash 后一定要 git stash pop 否则代码会丢失

git stash : #可用来暂存当前正在进行的工作
git stash pop: #从Git栈中读取最近一次保存的内容

以上是关于git pull 报错 error: cannot pull with rebase: Your index contains uncommitted changes.的主要内容,如果未能解决你的问题,请参考以下文章

git pull --rebase 报错 error: cannot pull with rebase: Your index contains uncommitted changes.

git pull --rebase 报错 error: cannot pull with rebase: Your index contains uncommitted changes.

解决win10 报错 git pull error: cannot open .git/FETCH_HEAD: Permission denied

adb pull 报错处理:adb: error: cannot create file/directory 'E:': No such file or directory

Transport Error: Cannot get remote repository refs.https://github.com/xxx/test1.git: cannot open git

git pull 报错 ,error: 您对下列文件的本地修改将被合并操作覆盖