ESDS Knowledge Base

02
Mar

GitHub – Open source Version Control System

Collaboration between software developers enhances their productivity which helps them collate new ideas. Developers with relevant skills can contribute to a project to add more features to it or even fix the bugs. A software goes through many changes in its development lifecycle and developers constantly make modifications to the program code, release new versions and patche/fix functionality issues. It is important to be updated with these variations because it helps in effective coordination among the developers in building new software as well as managing them. Sharing Platforms like GitHub serves this purpose.

What is GitHub?

It is an open source Version Control System initiated by Linus Torvalds. Generally, When developers develop any applications they often make revisions or modifications to it for improvement. A version control system is a tool that maintains these changes in a central repository which offers Source Code Management (SCM). Other developers can see these changes, download them and contribute by developing and uploading a new code in the central repository. Git is a command line tool whereas the central repository is a web-based GUI and is called GitHub (GitHub.com).

Note: Subversion, CVS, Mercurial are also version control tools but not popular as Git.

What are the features of GitHub?

GitHub is more popular than any other version control systems because it stores file changes more efficiently and ensures file integrity. You can see the history of a particular project. Following are the features of GitHub:

Repository

A repository or repo is a collection of all the files (images, videos, spreadsheets, and datasets etc.) of a project. Each project has a repository which can be accessed through a URL. You can create a repository in your GitHub account. Also note that the public repositories are free of cost while the private repositories are not.

• Repository

Forking

Forking is copying an account’s repository to another account for using it. This is done when you want to contribute to a project that you do not have write permission. You copy the repository to your account and make changes and release it as a new repository.

Forking

When you are working on an official project you make certain modifications and commitments in the project. The main repository is known as Master and the modifications which are made during a project are made in separate branches. When a user creates a Branch they create a copy of master for editing purposes. If someone else makes changes to the master while a user is working, another user can get those updates without affecting the work..

Forking

When you have made changes in your branch, you can commit (save the changes) to the master. You have to describe why the changes were made in the commit message.

ForkingPull request

You have forked a repository and made modifications to it. Now you want these changes to be recognised and included in the original repository that you forked. Thus, you need to make a pull request to the author. The author will see your work and may merge it into the main project.

Pull request

Social Networking

GitHub offers a social networking to like-minded users. Each member has their own profile. Members can follow other members and they can take part in discussions on projects and seek the expertise of other developers.

I am not a developer, why should I care about GitHub?

GitHub is a version control system which is not only for software applications but documents and worksheets can also be collaborated using GitHub. You can upload Word documents, Excel sheets on GitHub. Each modification to them will be stored as good as it does for applications.

How Should I start using GitHub?

To start with GitHub, you need to install Git on your local computer and create an account on GitHub. Following are the basic commands (in CentOS):

To install Git

Install Git

To customise your Git, click here.

To initialize an existing directory as a Git repository

Git repository

To retrieve anentire repository from a hosted location via URL

retrieve an entire repository

To create a new branch

create a new branch

To show all commits in the current branch’s history

branch’s history

To fetch down all the branches from that Git

Fetch Git

To transmit local branch commits to the remote repository branch

remote repository branch

To fetch and merge any commits from the tracking branch

tracking branch

To learn more commands of Git, click here. You can also refer to this to see more about Git.

Leave a Reply