docs/troubleshooting.md
You must follow these steps to delete a VFS for Git repository.
If you have attempted deletion before un-mounting jump to Recovering from an attempt to delete without un-mounting.
Un-mount the repo.
Since a VFS for Git clone has a running GVFS.Mount process to track the
Git index and watch updates from the ProjFS filesystem driver, you must
first run gvfs unmount before deleting your repository. This will also
remove the repository from the auto-mount feature of GVFS.Service.
Make sure the current working directory of your shell is not in the VFS for Git repo and that no other processes are using files in it. For example:
C:\Users\you\big_repo\src\> cd ..\..
C:\Users\you\> gvfs unmount big_repo
Clean up the remaining folder. (Do not try to delete the repo before it is un mounted.)
Once un-mounted you can fully clean up the old repo by deleteing it. Following the example from above:
C:\Users\you\> rmdir /S /Q big_repo
If you have attempted to delete the repo or its .gvfs folder, then you will
likely see alerts saying "Failed to auto-mount at path X".
Manually remove this repo from the auto-mount feature, remove the appropriate line
from the C:\ProgramData\GVFS\GVFS.Service\repo-registry file.
Ensure there is no currently running mount process for the repo.
Details tab.Name for instance) to choose Select Columns.Command line column which will show the full command line for each process.GVFS.Mount.exe process that has your repo in question in the command line arguments.End Task to end it.Proceed with removing the directory as described above to clean up the folder
with rmdir /S /Q REPO.
The GVFS.Service process checks for new versions of VFS for Git daily and
will prompt you for upgrade using a notification. To check manually, run
gvfs upgrade to see if an upgrade is available. Run gvfs upgrade --confirm
to actually perform the upgrade, if you wish.
Symptom: gvfs upgrade fails with the following error:
ERROR: Could not launch upgrade tool. File copy error - The specified path, file name, or both are too long"
Fix: There is a known issue with VFS for Git v1.0.20112.1 where the
gvfs upgrade command fails with a long-path error. The root cause is a
recursive directory copy
that loops the contents of that directory into the copy and it never ends.
The only fix is to manually upgrade to version v1.0.20154.3.
We are constantly improving VFS for Git to prevent known issues from
reoccurring. Please make sure you are on the latest version using gvfs upgrade
before raising an issue. Please also keep your version of Windows updated
as that is the only way to get updates to the ProjFS filesystem driver.
gvfs repairSome known issues can get your enlistment into a bad state. Running
gvfs repair will detect known issues and the output will mention if the
issue is actionable or not. Then, gvfs repair --confirm will actually
make the changes it thinks are necessary.
If gvfs repair detects a problem but says it cannot fix the problem,
then that's an excellent message to include when creating an issue.
gvfs unmount, gvfs mount, or restartSometimes the GVFS.Mount process gets in a bad state and simply needs to
restart to auto-heal. Since VFS for Git also interacts directly with the
ProjFS filesystem driver, sometimes a system restart can help.
Symptom: Enlistment fails to mount with an error such as
Warning: Installed git version <X> does not match supported version of <Y>
Fix: VFS for Git is tightly coupled to a custom version of Git. This error happens when the installed version of Git does not match the one that was included in the VFS for Git installer. Please download and install the matching version of Git from the VFS for Git releases page.
If your gvfs clone <url> command fails with this error, then check if you
can access <url> in a web browser. If you cannot see the repository in the
web, then you do not have permissions to read that repository. These issues
cannot be resolved by the VFS for Git team and must be done by your repository
administrators.
If you can see the repository in the web, then likely you have a stale credential in your credential manager that needs updating. VFS for Git should attempt to renew your credential. If it does not, then go to Windows Credential Manager and delete the Git credential for that URL.
Symptoms:
Fix:
The easiest way to fix ProjFS issues is to completely remove ProjFS, and
then rely on GVFS.Service to re-install (or re-enable) ProjFS.
C:\Program Files\GVFS\ProjectedFSLib.dll is present, delete itIn an Administrator Command Prompt
powershell -NonInteractive -NoProfile -Command "&{Get-WindowsOptionalFeature -Online -FeatureName Client-ProjFS}"
Check the value of State: in the output to see if inbox ProjFS is enabled.
If ProjFS is enabled
GVFS.Service starts, it will automatically re-enable the optional feature)gvfs mount repogvfs mount againIf ProjFS is not enabled
sc stop GVFS.Servicesc stop gvfltsc delete gvfltsc stop prjfltsc delete prjfltdel c:\Windows\System32\drivers\prjflt.syssc start GVFS.Servicegvfs mount repoIf the above steps do not resolve the issue, and the user is on Windows Server, ensure they have the latest version of GVFS installed.
Symptom:
User is not able to rename or move a partial directory inside their
VFS for Git enlistment. If rename or move is done using Windows Explorer,
the user might see an error alert with message Error 0x80070032: The request is not supported.
Fix: Partial directories are directories that originate from the virtual projection. They exist on disk and still contain ProjFS reparse data. When an application enumerates a partial directory ProjFS calls VFS for Git's enumeration callbacks.
VFS for Git does not support rename or move of partial directories inside an enlistment. However it supports rename/move of a regular directory. User can copy the partial directory and paste it inside the enlistment. The newly pasted directory is a regular directory and can be renamed or moved around inside the enlistment. The original partial directory can now be deleted.
The gvfs diagnose command collects logs and config details for the current
repository. The resulting zip file helps root-cause issues.
When run inside your repository, creates a zip file containing several important files for that repository. This includes:
All log files from gvfs commands run in the enlistment, including
maintenance steps.
Log files from the GVFS.Service.
Configuration files from your .git folder, such as the config file,
index, hooks, and refs.
A summary of your Git object database, including the number of loose objects and the names and sizes of pack-files.
As the diagnose command completes, it provides the path of the resulting
zip file. This zip can be sent to the support team for investigation.
Cache servers are a feature of the GVFS protocol to provide low-latency
access to the on-demand object requests. This modifies the gvfs.cache-server
setting in your local Git config file.
Run gvfs cache-server --get to see the current cache server.
Run gvfs cache-server --list to see the available cache server URLs.
Run gvfs cache-server --set=<url> to set your cache server to <url>.
The gvfs config command allows customizing some behavior.
gvfs config <key> <value>.gvfs config --list.gvfs config --delete <key>.The usn.updateDirectories config option, when true, will update the
USN journal entries
of directories when the names of subdirectories or files are modified,
even if the directory is still only in a "projected" state. This can be
particularly important when using incremental build systems such as
microsoft/BuildXL. However, there is a 10-15% performance penalty on some
Git commands when this option is enabled.
The gvfs config command is also used for customizing the feed used for
VFS for Git upgrades. This is so large teams can bundle a custom installer
or other tools along with VFS for Git upgrades.