In this section you will find information on how to use Git version management system in Visual Studio. It is possible to manage Git through command prompt, a desktop GUI version, or version control integrated into another IDE (such as PyCharm), but since we will be programming with Visual Studio, we are going to use the VS plugin.
Git is a version control system that helps software developers maintain backups and keep track of changes made to their projects. Essentially, it automates the process of copying backup versions of your projects to new locations. It also allows users to work on the same project from multiple locations, and multiple people to collaborate on the same project.
Here is the official website:
There is a lot more that it does, but we are just going to learn the basics for our purposes.
No. GitHub is simply a website that allows you to remotely store your projects using the Git system, so that it is easy for you to access them from any computer with an internet connection. It also makes it easy for multiple people to collaborate on a project at the same time. Oh, and it is free. GitHub is not the only free online Git repository, but is one of the more popular ones. It has also been integrated into Visual Studio.
We will use the Git system on the local version of our project, and store a remote copy of our projects on GitHub so that we have an extra backup. Through GitHub you can easily retrieve (clone) your projects from any computer in which you have internet access. It will also allow you to keep your projects long term, and share them with anyone you wish.
Go to GitHub, and create an account.
There is a ton of information and countless tutorials on how to use Git. Feel free to learn more on your own. We are only going to use Git and GitHub through Visual Studio Community 2019 in this course, but many people prefer the command line interface that you can use in a PowerShell or terminal if you are on a Linux machine.
Before you begin you need to add the GitHub extension to Visual Studio. Here is how you do it:
All of your Git options are found in the Team Explorer. If you do not see the Team Explorer tab next to the Solution Explorer, select the View menu, and then click on Team Explorer.
1 - Close Visual Studio and open it again, this can solve some errors.
2 - Worst Case Scenario, remove/delete your local repository (don't do this unless you have a fairly up-to-date version in your remote repository on Guthub), and Clone it again from your remote repository (GitHub).
Error Pushing updates to GitHub.
If you get a DB.Lock error when you try to commit a change, see this link for a possible solution: