I copy pasted a git repository from windows to linux, from a shared directory, to a standard one. And now, any git
command returns the error:
fatal: Invalid path '/shared': No such file or directory.
I tracked down the issue to a vestigial parameter from .git/config
which defines:
[core]
worktree = //shared/directory/source/project
Indeed, under linux, this dir does not exist nor is a valid path... I could solve the issue by deleting the incriminated line. But I couldn't find a single git command to reset this in a cleaner manner.