Back to blog

Git

GitHub Plugin for Visual Studio

Git is one of the most popular version control system, used by programmers all around the world. GitHub is a hosting service which provides full support for Git.

Git is one of the most popular version control system, used by programmers all around the world. GitHub is a hosting service which provides full support for Git.

What is Git

Image Git is a version control system for tracking changes in computer files. The whole system is based on repositories, which are made in chosen by using folders. Repositories are making snapshots of our system changes and store them. We are able to add suitable comments for all committed changes to make everything arranged properly. Git is creating new hidden folders inside the repository folder and store those snapshots with suitable comments. Thanks to that, we are able to come back to any saved system stage. Git tracking system is perfect for working with colleagues. It is providing tools to create branches and add new contributors to our project. It has also features which are helping with problems with desynchronization eg. two people editing the same piece of code.

How to use Git

Git has its own console and graphical interfaces. There are also special tools like GitHub on Visual Studio which provides full support for Git from the Visual Studio window. Priory, to use Git, we have to simply download and install Git to our PC. I would like to focus on the GitHub plugin for Visual Studio. It is easy to use and provides basic tools for managing the repositories. There are three basic functions in GitHub on Visual Studio: Pull, Push and Sync. Pull option is downloading the current version of repository from the server. Push option is uploading the local version of repository to the server. Sync is synchronizing local repository with server (committing pull and push). All of those functions can proceed from Visual Studio itself. We don't need to go out of the program to create new repositories. GitHub plugin is also adding functionality to create a git repository inside the new project. We just have to tick this option while creating. We have to remember to create a new repository on the GitHub website and synchronize it with Git plugin, to make it be accessible by other people.

Managing your GitHub repositories

To manage repositories I highly recommend to visit the GitHub website. We can find there many useful features which are easily accessible in the graphical interface. We can add new branches to our project, add new contributors and also add external GitHub apps which are useful in some cases. I also recommend GitHub documentation https://guides.github.com/features/wikis/ to check out how to use GitHub properly.

Download repository

If the repository is set as public, we don't require any external privileges to pull other people repositories. The easiest way to do it is to right-click inside the folder which we want to use and choose "Git Bash Here". We will see the git console. To pull repository we have to write command: git clone [GitHub URL]