I have updated Mac OS from Sierra to Monterey recently. Since then I have been facing some issues. One of them is in VSCode, when I do changes to the files the changes are not reflected in Source Control or Explorer until the refresh button is clicked manually in Source Control Tab. Can anyone help me out to solve this issue?
I have git 2.16
installed in my machine.
I have updated the version of VSCode and git.autorefresh
is set to true.
Update 1:
I have reinstalled git. Now I have git 2.35.1
. But still, the Source Control
tab is not auto refreshed.
CodePudding user response:
As Visual Studio Code "Version Control" page mentions:
Note: VS Code will leverage your machine's Git installation, so you need to install Git first before you get these features. Make sure you install at least version 2.0.0.
So first of all make sure you have installed git on your machine(GIT FOR macOS).
Then
- Open the command palette in vscode(In mac,Press ‘’
Cmd Shift P
’’): - Type "
open settings
" - choose "Open Settings (JSON)
In the setting.json file, add the following flag for auto-refreshing: "git.autorefresh": true,
Then save the changes. your problem should be solved.
In addition, There are more git config that you can use them(just type git in setting.json file for more options)
CodePudding user response:
I had my project in /System/Volumes/Data/<my-folder-name>
. After moving to /Users/<user-id>/
, it started working. I even created a simple project in both the folders and tested them. Project in the former path faces the issue whereas the latter one doesn't face any issue. So I moved my work to the Users
folder but I don't know the root cause.