This is part one of a small series illustrating how to get started using GitHub with Visual Studio 2019. We will first add the GitHub extension in our IDE and then go over how to start a new project or add an existing project to GitHub and finally look into how we can bring in an existing project on GitHub into our local computer and begin making contributions.
Regardless of the complexity of your project, it is always a great idea to use source control. Interacting with source control software is a daily in the real world and any hands-on familiarity really boosts your credentials when starting a job as a software developer. (Even now, source control is not only used by developers but also artists and writers!)
Source Control vs. Version Control
You might hear these two terms used interchangeably in day to day conversation and wonder if there is any difference between the two. The answer is, not particularly. There is a greater difference between source control and revision control than source control and version control. Version control is a broader term that encompasses both source control and revision control. Source control adds the features of branching and merging to differ from revision control. Whether you refer to it as source control or version control, others will know what you are referring to. If you are interested in reading more about this topic, please check out this StackOverflow thread.
Git vs. GitHub
GitHub is a hosting service for Git repositories and Git is the actual tool that makes version control possible. There is several Git hosting services available such as GitLab, BitBucket, SourceForge, etc so you are not limited to using GitHub. Some of these services also have Visual Studio extensions so you can easily integrate them into VS 2019.
Basic Git features come packaged with VS 2019 but Microsoft does recommend installing the full version of Git on your machine. For this series, we can get by without installing Git. Please refer to the link provided to see cases where you will need a full installation of Git.
In order to use GitHub with your project in Visual Studio 2019 we will need to download and install a Visual Studio extension.
1. Begin by opening up an instance of VS 2019. In the menu, click Extensions and the Manage Extensions.
2. A new window containing a number of extensions available for VS 2019 will open. If the GitHub extension is not among the top listed, search for “GitHub” and click “Download”.
3. A new window will open up and initialize the download process. Once downloaded, you will need to verify that you want to install the extension. Select “Modify” to agree. Your instance of Visual Studio 2019 will likely need to restart.
Upon, restarting Visual Studio 2019 you should now see GitHub under Azure in the Hosted Service Providers section in the Team Explorer pane. Click “Sign Up” if you don’t have a GitHub account or “Connect” to login into an existing GitHub account. Tada! We are ready to begin using GitHub within VS2019.