Git: Everything about git.. Today, we will be exploring about git…
By: Apoorv Singh Tomar
Tags: Git, Software, Bitbucket, Software Development, Github

In this post, we will be exploring about git, and other source control platforms like Github, Bitbucket and Gitlabs.

Let start with what is git?

Git is an essential tool, which every developer needs to understand as it is widely used in the development eco-system and it will be easier, to transition into another team, since it is a practise which is intensely followed.

There are hundreds for command, related to git. But few of commands will be used most, in the latter part of this article, we will be exploring these popular commands.

Since nowadays most of the code editor gives the option of using git through the user interface, which is kind of an easy way of doing things.

But I will suggest, to be clear with the command line of git, then only you will be able to understand user interface easily. If directly someone starts using the user interface provided by code editor, your basics of git will strongly lack.

GIT

Git is defined as an open-source version control tool, used to manage small to big open source project. Read more about Git, Git(click here).

Version control can be defined as maintaining a version of the project. This means maybe in future if you want to rollback to the older version or want to check the difference you made to your code, it can be easily done using git.

Understand it like this, git helps you save your life, in case something goes wrong in your code at any time. You can clearly see what changes you made to your code, which could have caused that issue. Again if you have two developers working the same codebase, then it will be easier for you to merge and deploy your code. You can maintain branches, which is a different version of the codebase. To elaborate suppose, there are two tasks, the first one is to make a login page API and another one is to list API, which will be returning you some set of data.

Now you can work on these tasks simultaneously, by making two different branches from the base branch and keep on adding/committing your code. Similarly, you can share your code and get help from another developer, simply by pushing the code in the branch, sharing the branch name with another developer. If due to any reason you don't want your code to be merged into the main branch you can delete the branch and everything becomes sorted.

Without git, all these task have to perform manually which could be a big and confusing task.

Different types of hosting source control software?

Bitbucket, Github, GitLab etc., there are the few popular tools used to host your code. This tool is used to share code among different developers.

All these source control software provided you with an online user interface where you can check different versions, branches, pull request from your peers.

Most of these have grown up so well, that all your purpose for managing your code becomes very easy. It is hard not to find something in this software which you will be needing.

Few of the git commands:

Frankly saying, there are many commands available when we talk about git, but the following are few of the common one which you will be needing on a day to day basis.