Error: Cannot pull with rebase: You have unstaged changes

前端 未结 9 1848
无人共我
无人共我 2020-12-07 07:33

I have started collaborating with a few friends on a project & they use the heroku git repository.

I cloned the repository a few days ago and they have since mad

9条回答
  •  星月不相逢
    2020-12-07 08:13

    Do git status, this will show you what files have changed. Since you stated that you don't want to keep the changes you can do git checkout -- or git reset --hard to get rid of the changes.

    For the most part, git will tell you what to do about changes. For example, your error message said to git stash your changes. This would be if you wanted to keep them. After pulling, you would then do git stash pop and your changes would be reapplied.

    git status also has how to get rid of changes depending on if the file is staged for commit or not.

提交回复
热议问题