I recently created a new branch locally, published it to remote and it received an update from a colleague.
While I do have changes in my repository, none of them are on files that were modified.
I therefore expected that a git pull would work as implied by the message from git status:
$ git status
On branch XXX
Your branch is behind 'origin/XXX' by 2 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: ...
However pulling results in an error message implying that there is a rebase in progress:
$ git pull
error: cannot pull with rebase: You have unstaged changes.
error: please commit or stash them.
I don't know where this might have come from as I never consciously did a rebase. Also, strangely:
$ git rebase --continue
fatal: No rebase in progress?
I can pull when stashing my changes and popping them afterwards without a problem, and am aware of the autostash option, but I would like to understand what is going on here.
Where did the rebase come from? Why do git pull and git rebase appear to disagree whether there is a rebase? How can I clean up this mess?