I've read a lot of other questions about the subject error message ("Not possible to fast-forward") but none of them seem to apply to my situation. I create a branch (git checkout -b issue-215), make a change, and commit locally. I push the change, then make new changes and another local commit:
* 4b797d2a - (HEAD -> issue-215)
* 180a7ab5 - (origin/issue-215)
* 863ef01a - (origin/master, origin/HEAD, master)
ETA: as requested in a comment, the output of git branch --all -v:
* issue-215 4b797d2a [ahead 1]
... other branches ...
master 863ef01a
remotes/origin/issue-215 180a7ab5
...other remotes....
remotes/origin/HEAD -> origin/master
remotes/origin/master 863ef01a
There are no new remote changes, but VSCode wants to pull before it pushes. That's where I get this error. So, to troubleshoot, I run git pull origin issue-215 manually, and get the following output:
$ git pull origin issue-215
From ssh://my.repo/project
* branch issue-215 -> FETCH_HEAD
fatal: Not possible to fast-forward, aborting.
Keep in mind, there are no new changes on the server, and the history from my current local commit back to the branch on the remote, back to master and origin/master, is a straight line. I am not trying to merge or rebase, my local code is already a direct child of the branch I'm supposed to be pulling.
This only started happening about a month ago. Previously, clicking the "sync" button in VSCode would work, but since then it always fails with this error message. Could I have made some kind of gitconfig change that causes this behavior? There's not much in my global gitconfig file, and it happens with at least 2 projects so I don't think it's something I did to the repository.