Do you know how Git, Bitbucket, Gitlab and Github are related ?

This article is particularly for the new developers who just started using git. I am assuming you already know basic usage of git. Most of the new users of git, think git and github is same thing and we need github or any other websites like bitbucket, gitlab account is necessary to use git. We often use git term for github or bitbucket which is neither absolutely wrong nor exactly right but a shortcut to save time in communication.  Let’s understand what exactly these from basic level are:

  • Need to understand Version Control System at basic level:
    There is a broader term Version Control System (VCS) which keeps track of our revisions and changes in our source code. Git is one of the most popular version control tools and other popular tools are SVN, Mericurial. We will talk about git here and will keep other version control tools safe for other day. Git only keeps track of source code changes only on the system where it is installed and if we don’t have a repository publishing place, it makes it limited to only one machine and unable to share code among other peer developers. But you may ask “We share the code with others by pushing on github/bitbucket repositories”.  Let’s learn about these more in next point.
  • Collaboration and easy deployment with repository management websites:
    We have installed git and did some commits. Everything is working perfect but we want to collaborate with other developer or designer. You don’t have to worry; we have 2 ways to achieve this:
    1. Copy the entire source code folder including hidden git folder and share it with your peers
    2. Publish the source code and the repository tree on a global place where everyone can access
    Method 1 seems not a feasible way on regular basis so let’s avoid this. Method 2 is the correct way and almost all git users use this method. To fulfil the global place here the repository management websites come into picture; which are https://github.com/, https://bitbucket.org/, https://about.gitlab.com/ and many others where you can create public or private repositories and publish your version tree and invite others to synchronize your work and make deployments easy
  • Repository management websites are just repository containers of git version tree:
    I explained in above point that github and other websites are just git repository managers to make your source code version tree sharable which help to work in collaboration. When you create a repository on these repository manager websites and push your commits then all your source code along with commit tree copied to the created repository and you can invite other collaborator there to work in a better way.  You can pull the code to get other developer’s versions or changes. To understand it in simpler way, let me say it simple word:
    “Mysql is database and to access it in GUI we use phpMyadmin, same thing is with git as to access it more efficiently and utilize its potential we use repository manager websites”
  • It is not necessary to use repository manager websites to start using git:
    Repository management websites just increases the usability of git by exposing our source version tree among peers or make deployment easy by pushing code from local server to repository manager and pull on live server. If you are working on a project where you will not deploy it any soon and you are the only one then you can only use git to commit your changes and you don’t need to make account on any repository management website like github. Whenever you want to deploy your code then create your account and repository and utilize the easy deployment of your application.

Now I believe you understand that git is a version control system and other websites like github and bitbucket are just repository manager to work in team in an efficient way. You don’t have to use github with git rather you can use any other available repository manager as per your convenience even you can use your own repository manager. We will talk about it more in another article.

Do you want to know more about how much git can be powerful with some repository manager like github? Check here: http://sunitpanwar.com/why-github

Category: