Open jeffrson opened 2 years ago
I have the same problem on Linux using version 1.71.2 74b1f979648cc44d385a2286793c226e611f59e7 x64
Just encountered this in two separate repos one after another, very cryptic error, thanks for this issue.
Possibly related Stack Overflow question: What is causing "Cannot fast-forward to multiple branches" during git pull
?
Possibly related Stack Overflow question: What is causing "Cannot fast-forward to multiple branches" during
git pull
?
Yes, very much related root cause.
I'm also getting this when I type git pull
in the terminal within VSCode. But when I then type cd ..
and cd <repo>
and try git pull
again, it works as expected.
It should probably also work if you wait a couple seconds and try again to avoid any concurrent fetch so the cd shouldn’t really be required I believe. On Jul 13, 2023 at 02:45 -0700, Niels van Amstel @.***>, wrote:
I'm also getting this when I type git pull in the terminal within VSCode. But when I then type cd .. and cd
and try git pull again, it works as expected. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
I also encountered this error, but it's really hard to reproduce since it seems to just appear randomly. Just now I also saw this error, but without changing anything, after a few seconds it worked again.
VS Code should use git fetch --no-write-fetch-head
to do autofetch.
@xmedeko what do you mean "shall"? Did you make a PR? Or did you mean to say "should"?
@starball5 I meant to say "should". I've fixed the comment. (Apologies, not a native English speaker.)
I stumbled upon this even though I am not using vscode, just plain git in a terminal. Any ideas? @starball5
I stumbled upon this even though I am not using vscode, just plain git in a terminal. Any ideas? @starball5
I told you on SO already. If your problem has nothing to do with VS Code, you're in the wrong place asking about it here.
Probably trivial, but ftr: I just encountered the same error when I had not yet pushed a commit on device A with my GitHub login and tried to pull on device B with the same login. Pushing on device A solved the problem for me.
Just encountered the same error
git pull
Response:
fatal: Cannot fast-forward to multiple branches.
git status
Response:
Your branch is behind 'origin/branch-name' by 5 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working tree clean
git pull
Response:
Updating 96f179ca..369254d7
Fast-forward
...
3 files changed, 216 insertions(+), 156 deletions(-)
I am using a VSCode terminal. This was the first command I ran in VSCode today. Maybe it's a network timeout issue.
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
In a folder with Git working copy with multiple branches and valid remote:
git config --local --add pull.ff only
Apparently,
git fetch
can run duringsync
(or the other way around). If this occurs, there might be an error, requesting to open Git log, which contains "Cannot fast-forward to multiple branches".