GitHub tutorial for beginners

Many of you probably have heard GitHub and seen the web platform GitHub.Com, but do you really know what the platform is all about? or how to use Git tools with visual studio for your regular software development? Let's understand this GitHub tutorial with some example of our regular software development life cycle.

github tutorial

GitHub is one of most popular collaboration tools for modern software developers, who are contributing large-scale software development from different geography; GitHub is most widely used repository for cloud software development and collaboration.

We can download and install Git tool that can be integrated with SDK in your local machine, here in the tutorial we will learn how to use github in visual studio and push code to github repository.

Learn Git Tools with Visual Studio

Git tools is an agile project management tools, which allow you to collaborate with developers from different locations, You can start using github tool either two ways

  • Install github in your local machine, this will allow to use visual studio command prompt to work with github repository.
    You can download installer from
  • Install github tool in from NuGet Package manage, this will be project specific installation, you will see git menu in your project tool bar, that will allow you to push and pull code from repository.
    Two utilities to be installed, Microsoft SourceLink Github and GitHub.

After installing the utilities, you will see a git menu in your visual studio instance, where you can configure local codebase to remote repository.

Here is the setting screenshot, provide local path values (the project folder of your local machine)

visual studio to github

You can either map to existing repository or create a new repository in github.

Once you successfully connect to github remote repository from local visual studio, you will see lock icon next to each file, folder and solution, now whenever you make changes to any item the icon will change (termed as checked-out), after making changes you need to push the new changes to github remote repository again, (if you are familiar with SVN, you find the process very similar)

From your visual studio when you are connected to github, you will be able to see all project files in your github control panel (like screenshot below).

visual studio to github

Push code changes to GitHub Repository

Now i will make following two changes in my project, which will help you to understand how to push updated files to github repository and how to add new file.

  • Making changes in existing file, Add a new property to existing class Student
    git push command to check in files
    After making changes in any file, just make sure compilation is happening properly, then right click on that file in solution explorer, then go to Git, click on comment or stash.
    Make sure you check the “Amend” check box when writing comment and then click commit.
    Finally click push button from top menu.
    git push command to check in files
  • Create a new Course class, and add the new file to solution
    The git push process remain same, only difference instead of pushing one single file, you need to push the entire solution to github repository.
    When you add any new file to solution, you need to push the solution, which will push all the new files added to solution including existing files, so you can consider this as complete project push.

Issue management with GitHub Tool

We can manage any number of issues in Github repository, you can create new issue and assign to any team members, change the type of issue to most relevant, there are types like enhancement, bug, duplicate, good first issue, help wanted, invalid etc.

visual studio to github

In issue details section you can attach any file that supports your testing report, finally can close the issue when done.

Good to Read
You may also read
Machine Learning Tutorial C# ML.Net
Machine Learning Tutorial C# ML.Net
How to add facebook chat in website
add facebook chat in website
NUnit Testing C# Tutorial
NUnit Testing Tutorial C#