What is Github?
Note: This is a guest post written by @scriptonist and contributed during Hacktoberfest. It’s nice and approachable. Thanks @scriptionist!
What is Github?
Github is a platform which can be used to host code. It also helps in version control and collaboration. It allows a number of people to collaborate on a project.
A repository is a mechanism that can be used to organize a single project. It is the place to go and find every files and folders which are related to a single project.
We may want to have different versions for our project. We may want one version which is ready for deployment and another one which we may be using to experiment a new feature. This can give rise to a number of different versions for a single project.
A branch is used to manage different versions of a repository. A repository can have many branches. A branch called ‘master’ is called the definitive branch.
Let’s say that I want to add a new feature to my project. Then I will create a new branch do my edits and improvements. I will save those improvements and submit this branch for review. After the review and necessary corrections this branch will be merged to the master branch.
In Github when you make some changes and save it we call it ‘committed changes’. We can include commit messages along with each commit so that we can understand what are the different changes that we made.
We have talked about branches and merging of a branch to the master branch; this is where pull requests come in. When we open a pull request we are actually shouting out that “I have made some changes please review it and merge my work”.
After reviewing a pull request and correcting the problems we can finally add out feature to the master branch. This process of combining a branch with the master branch is called merging.