How do I connect my existing Visual Studio 2022 project to an existing github repository?

I set up a github repository to match the project I am working on in Visual Studio 2022. I did something wrong and only the project file exists. I followed a tutorial. But the tutorial was disappointing and the instruction was to drag the content of my project and I suppose I only uploaded the project file.

That was then. This is now. So far this is what I have done. In Visual studio I opened a command window by click on CTRL + `. THen using the.git file and its location from my github repository, I typed at the command line:

Processing: image.png…

Is the .sln in the repo? Or is it just a blank repo and you’re trying to sync it?

You described what you did in the past but I do not understand what you are asking how to do now.

For the future at least, you can create a repository at the same time as you create the project. You probably need to have your GitHub account configure first, I forget how to do that. Try creating a project and see what happens when you select the option to create a repository for it.

Do you have a Git menu in VS? As in:

VS_Git_menuitem

You probably must install the extension to get that.

VS can make it quite easy to work with Git repositories, no need to use a command window. You can use a command window but usually it is not necessary.

The following appear to be useful tutorials.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.