Can not pull: You have unstaged changes
testgit@VM8:[~/ers](master)$ git pull --rebase
Cannot pull with rebase: You have unstaged changes.
Please commit or stash them.
Reason: Some files have been changed, when you merge latest commit in remote repository, these files have conflict changes. So Git won’t let you do this.
Solution: Note: DO the operation under root directory.
1). If you want to keep your changes and continue pull operations:
$git stash #备份工作区
$git pull --rebase
$git stash pop #恢复最后一次保存
2). If you want a clear environment and reject all your changes:
$git clean -dfx #删除新创建的文件
$git checkout -- . #丢弃本次修改
$git pull --rebase