Connecting visual studio code to github repository

I’m receiving an error Git: fatal: couldn’t find remote ref master when I try to commit changes from Visual Studio code.

I see that my git repo only has a main branch. Do I need to create a separate master branch? Is there a step-by-step guide to linking visual studio code with my ghost template to an existing git repository?