microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.71k stars 29.09k forks source link

Pull > Pull From always give error to set git.config but not solving even set #231969

Open xkeshav opened 2 days ago

xkeshav commented 2 days ago

Does this issue occur when all extensions are disabled?: Yes

Version: 1.94.2
Commit: 384ff7382de624fb94dbaf6da11977bba1ecd427
Date: 2024-10-09T16:08:44.566Z
Electron: 30.5.1
ElectronBuildId: 10262041
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Linux x64 6.8.0-47-generic snap

Steps to Reproduce:

> git pull --tags origin release
From github.com:author/repo-name
 * branch            release    -> FETCH_HEAD
fatal: Not possible to fast-forward, aborting.

I remember once I set something when asked by vs code then set git.pull ff only or some other option; and now remove from that [ff] entry from .git/config file and now when do Pull > Pull From it shows below error

> git pull --tags origin release
From github.com:author/repo-name
 * branch            release    -> FETCH_HEAD
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint: 
hint:   git config pull.rebase false  # merge
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.

so I want to know what is equivalent to git merge <branch> --no-commit

vs-code-engineering[bot] commented 2 days ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.94.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

lszomoru commented 21 hours ago

so I want to know what is equivalent to git merge <branch> --no-commit

Looking at the source code, VS Code does not currently implement the equivalent of this.