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

created at 08-11-2021 views: 163

error message

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

solution

1. Execute first

git stash

2. Re-execute

git pull –rebase

3. Finally execute

git stash pop

Note: Remember to git stash pop after git stash, otherwise the code will be lost

  • git stash:  can be used to temporarily store the current work in progress
  • git stash pop: Read the last saved content from the Git stack
created at:08-11-2021
edited at: 08-11-2021: