Team Foundation Server (TFS) is commonly used as the principal code repository for edition control operations by teams working on.NET projects. On the other hand, GitHub is now widely utilized as an internet-based code repository. This repository can be used by groups working in geographically dispersed locations to manage their version control. As a result, it’s a valuable tool for team collaboration.
GitHub has evolved from a young source control service to a powerful DevOps solution in just a few years. Along with uploading the portal, GitHub has excellent connectivity with tools like Visual Studio, allowing developers to have a better experience within their work environments.
Why Use the GitHub Plugin?
Essentially, when an enterprise or team has been using GitHub for a long time and would like to continue using it in terms of ease of use and without making any new investments, they would prefer to utilize GitHub for any type of project.
Let’s look at how to distribute a .NET project via the GitHub repository.
- Version 2015 of Microsoft Visual Studio.NET
- Able to access the GitHub repository.
- On the Windows PC, Git should be installed locally.
How to Install the GitHub Visual Studio.NET Extension
It’s important to install the GitHub plugin for the Visual Studio.NET IDE before users can share the .NET code to the GitHub repository.
- Double-click the downloaded extension and select Install.
- If you have the Visual Studio.NET IDE open, restart it again. To see if the plugin is installed, open the IDE and then go to Tools-> select extension and click on Updates.
- Under the Installed category, look for GitHub.
How to create a GitHub repository in Visual Studio.NET
- Create a GitHub repository from the Team Explorer home screen once the GitHub plugin is installed in the Visual Studio.NET IDE.
- Enter the name and credentials for the GitHub repository. Also, for the.NET project, make sure to provide a suitable local path in which the local Git repository would be placed.
- Select Create. The GitHub repository is created, and users can now build a new Project or Solution by following the link in the Team Explorer.
- Now in the Visual Studio.Net IDE, go to the Team Explorer and click the Create project or Solution option. Click OK after selecting the checkbox “Create new Git repository.”
- It’s worth noting that the path of the local Git repository where the.NET project will be placed is automatically specified.
- The project has now been set up at the proper location.
- To confirm the changes to the local Git repository, return to the Visual Studio.Net IDE and select Team Explorer-> Changes.
- Add a comment and then click Commit All. We can Sync the modifications to make them accessible to team members in the GitHub repository once they’ve been committed to the local Git repository.
- Choose the Sync link to upload the program code to the GitHub repository. Verify that the.NET project is available on the GitHub repository. So, instead of utilizing the command line, users can use the IDE to run ‘git push’ to the GitHub repository.
- Then click the Push-button.
- The GitHub repository for the project is now open.
- Make a minor modification to any file and then commit it.
- Once the changes are made to the file, a RED tick appears. Users can commit the file by right-clicking on it and selecting Commit.
- The modifications are visible in the Team Explorer, where users can comment on them and commit them all.
- As is standard procedure, users must Sync and Push the updates to the GitHub repository once the Commit is complete.