How to add existing Visual Studio Soluton in Github repostitory?

Here is a step-by-step guide on how to add an existing Visual Studio Solution to a Github repository:

  1. Install Git: In order to use Github, you need to have Git installed on your computer. You can download Git from https://git-scm.com/.

  2. Create a Github account: If you do not already have a Github account, you need to create one. You can create an account at https://github.com/.

  3. Create a new repository: Once you have a Github account, log in and create a new repository. You can do this by clicking on the “New” button on the top right corner of the Github page.

  4. Clone the repository: Clone the repository to your local machine using Git. You can do this by using the “Clone or download” button on the Github repository page.

  5. Open Visual Studio: Open Visual Studio and open the solution that you want to add to the Github repository.

  6. Add the solution to the local repository: In Visual Studio, go to File > Add to Source Control. This will add the solution to the local repository.

  7. Add the solution files to Git: In Visual Studio, right-click on the solution and select “Open Folder in File Explorer”. In File Explorer, select all the files and folders in the solution and right-click on them. Select “Git Bash Here” and run the following commands:

git add . git commit -m "Initial commit"

 

  1. Push the solution to Github: Run the following command in Git Bash to push the solution to Github:
git push origin master

That’s it! You have now successfully added an existing Visual Studio Solution to a Github repository.

Comments

Popular posts from this blog

Method overloading in C#

What are tuple in c#?

How to read/write google sheet in C#?