Git on Ubuntu in Visual Studio Code

I found myself getting frustrated with Visual Studio Code (vsc) today on Ubuntu with GitHub. I had a repository that was properly cloned, yet vsc insisted that “The folder currently open doesn’t have a git repository”.

vsc init repo message

I installed the GitHub extension and confirmed my account was set in vsc and still no joy. Finally went to the terminal in vsc and ran git status and received the following:

fatal: detected dubious ownership in repository at '/media/sf_vm_share/notpublicrepo/vsc-projects/mytrailhead'
To add an exception for this directory, call:

        git config --global --add safe.directory /media/sf_vm_share/notpublicrepo/vsc-projects/mytrailhead

so I did as suggested and then there was:

VSC Commit Option

Facebooktwitterredditlinkedinmail
© Scott S. Nelson

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.