https://github.com/git-account-user-name/demorepo
Now copy the path and open Visual Studio 2022. After opening the Visual Studio 2022 check the left side menu panel names as "Get Started".
Click on "Clone a repository" you will get the below screen shot.
Now click on "Clone" button. If you get popup for entering User Id and Password, you need to enter the detail and click on login. Ones you were done by adding credential visual studio will open and start downloading the file from repository.
Now click on "Clone" button. If you get popup for entering User Id and Password, you need to enter the detail and click on login. Ones you were done by adding credential visual studio will open and start downloading the file from repository.
Now here are having two scenarios first we are checking out a blank repository and the second one is your repository is already having the source code of a project. Now let's first cover a blank repository. In case of blank repository in checkout folder we will get a folder .git and .vs.
Blank Repository
For this close the Visual Studio 2022. After closing the Visual Studio 2022 reopen it and create a new project in the local repository folder or any of the location which you like.
Now copy the file in the repository folder, and after open the project by clicking on .sln file. By default, the repository will be selected.
Now open the Git Changes panel and we need to stage all the files by right clicking on the project folder or the file which you want to commit. After staging the files, we need to add the comment and click on commit stage. After committing the stage, we need to push the changes to repository by clicking on Push button.
Now we are done open your repository in GitHub.com and check your files.
Repository Having Files
When we checkout a repository already having files, after cloning the repository you need close the visual studio and go the local folder where your code files are available. Open the project you will get repository selected by default and your Git Changes panel will be blank. It will show only those files in which you have you have made the changes.
To commit the code stage the file in which you are having change. After staging the file click on commit stage. Ones commit is completed you need to push the files to repository.