What is GitHub and how GitHub can help SQL Server developers? In this tip we will show you the basics on how you can use GitHub for your SQL Server database development.
SolutionGit is an open source distributed source code management system. GitHub is a platform designed based on Git. GitHub offers many features that increase development productivity. An organization can use GitHub to maintain source code or to manage software projects. In addition, community projects also can be done effectively in GitHub. GitHub offers features such as bug tracking, feature requests, task management and wikis pages to increase the communication and collaboration among the team members. GitHub is a popular destination for community projects, because it is easier to integrate developer code with other community members.
GitHub features The issue tracking tool in the GitHub offers an easy way to manage the projects Members can share code review comments using GitHub. This promotes collaboration and increases communication. Mail notifications Wiki pages style documentation Data visualization Subscribe / Watch facility based a denotation Advantages of GitHub It is very easy to integrate with open source projects, as most of the open source projects are hosted in GitHub Low level access controls for team members Works with all major CI tools Various tools and plugins are available for tight integration with other CI (Continuous Integration) tools and Visual studio to increase the developer productivity. Ideal for geographically distributed development teams Support for command line operations Licensing Options GitHub.com - An individual or small team can make use of GitHub.com for personal or community purposes. The source code will be in public domain. GitHub Enterprise - It is suitable for medium and large-scale enterprises. This option will allow the organization to host GitHub securely on premises. Private Cloud - It is also possible to host the GitHub in AWS (Amazon Web Service), Azure or in Google cloud platform. Points to ponder RepositoryA repository is a place where all source code and documents are managed for a project.
IssuesGitHub Issues helps to consolidate the business requirements associated with a change and fixes. This increases the collaboration and communication, as all the dependent information persists in one place. It is highly suitable for teams practicing Agile for development. Wiki GitHub has a wiki style project documentation to store all the business requirements.
BranchThe production source code will be maintained in the "Master" branch. A new branch will be created from the "Master" branch. All the changes associated with a project will be done in this branch. This will help the team to test the changes on the isolated branch. After the successful completion of the testing the new branch will be merged with the "Master" branch. After this the new branch will become obsolete and can be removed. The new branch will be live for the duration of the project to support the development and enhancement.
Pull RequestA pull request indicates the readiness of source code for review. Once the pull request has been created, you can share and review the changes with administrators and commit before the changes are merged into the "Master" branch If you use the keyword "Closes" immediately followed by the issue number, the issue will be closed automatically once the pull request has been merged.
Merging pull requestThe merge function will integrate the newly created branch to the "Master" branch. The administrator will have overall visibility and be able to review the code and will be able merge with the master branch. If they are not happy, they can hold the newly submitted change.
Using Code ReviewGitHub has a utility to do the code review for the changes committed to a branch. A reviewer can view and approve the change.
CommitsCommit save all the changes to GitHub (Server) since the last commit. A developer can leave appropriate comments during commit. Usually the comment describes the nature and purpose of the change.
GitHub PagesA GitHub page will allow the developer to create static webpages. In addition, html pages can also be generated from the comments in the source code. GitHub pages can be created by creating a branch with the name "gh-pages." The static html pages and images can be uploaded into this repository.
GitHub RegistrationYou have to register with GitHub.com to make use of GitHub. GitHub has many pricing models based on your need. All different plans can be found here . With the enterprise solution you can host GitHub within your organization.
GitHub for SQL DevelopersI assume that you have registered with GitHub.com. Now in this tip, we will be using Visual Studio to create a database project and check-in the code into GitHub.com.
GitHub Plugin for Visual StudioNow let's see, how we can work with GitHub using Visual Studio. Visual Studio has a plug-in to work with GitHub directly. You can search for the "GitHub Extension for Visual Studio" in the Extension and updates menu. Once found, you can download and install the extension. You may need to close Visual Studio in order to complete the installation.

Once successfully installed, you can start Visual Studio. Now you will be able to see GitHub under the menu "Team Explorer" which is available next to the solution explorer.

You can then click on the "connect" link to login into GitHub.com. You can then provide your credentials and login into GitHub.com.

Once you logged in, you will be able to see the GitHub menu under "Team Explorer" as mentioned in the below picture. As a first step, we need to create a repository with GitHub. This can be done by clicking on the "Create" link.

On the "Create a GitHub Repository" page, provide the Name and the description of the repository. Optionally you can also change the "Local path". Once done, click on the "Create" link to create a new repository.

Once the repository has been created, you will see the solution explorer with the newly created repository and the readme.md file, as shown the picture below.

Creating new solution under the new repository
We have successfully created a new repository. Now we need to create a solution within this repository. Let's access the menu "Team Explorer". Under the "Solutions" menu you can click on the "Create" link to create a solution.

Our aim is to create a new database project. Hence let's select the "SQL Server" template on the "New Project" window. In addition, you can supply the Solution N