The Takeaway: Using GitHub as your repository for version control makes development of your automation solution MUCH easier!
An important element of your automation project is to make sure you can keep it backed up and available.
A great way to do that is with GitHub. As a version control system and repository, GutHub allows you to keep track of changes in your automation solution, make the code available to others working on the project, and fork your project in order to further develop the project in new directions.
This article will assume that you:
- Already understand the basics of version control and repositories. If not, this video and associated YouTube channel can help out there
- Already have a GitHub username and password. If not, do that here.
- Already have the GitHub Extension installed as part of Visual Studio, If not, here it is.
- Open your Automation solution in Visual Studio.
- Right-click on the solution for the project and select Add Solution to Source Control
- At this point, Visual Studio will create a git folder in the folder where your solution is saved (which is typically hidden). This folder is needed to keep track of changes to your solution
- You will also notice that your solution, folders, and files have a blue lock on them
- Navigate to the Team Explorer window
- Click the Sync link, and the Publish to GitHub option should display
- Click the Get Started link. Since the repository you just created doesn’t haver a remote version, we can use this tool to create a version on the GitHub website
- Click Publish. Now you should be able to go to your GitHub Profile, click your Repositories link, and view your repo
Click here to find the above page, so you can either clone or download the files for this solution as well!