In this blog, we’ll go through the steps to create a Git repository in VisualStudio, add it to GitHub, and push your project files to your GitHub repository.
The solution that worked for me was to use "Git Gui" to stage, commit, and push the existing project files to the new repository. I'm sure there's a better way and good explanation for this, however I just wanted to share what work for me in case anyone else tried the above without success.
Open a solution in VisualStudio. If solution is not already initialized as a Git repository, select Add to Source Control from the File menu. Open Team Explorer. In Team Explorer, click Sync. Click the Publish to GitHub button. Enter a name and description for the repository on GitHub.
In this video, I will guide you step by step on how to upload your project from VisualStudiotoGitHub and keep it updated with commits and changes....more
First, we need to add our Github account in the VisualStudio and then we have a create a repository with the proper name according to our needs. Now click on the Create and Push the button and VisualStudio automatically pushed all the files in the Github repository.
First of all, we need to fork the repository on which we want to contribute to our own Github account. It can be done by clicking the fork option near the top-right corner of the repository. After that, we need to open the files of the forked repository on our local PC.