The developer creates applications every day and makes changes in that existing applications as well. Just imagine a situation, there is a big E-commerce company and has millions of clients. Currently, the application is working good and the developers and trying to change the user interface of that application. If they are trying to make changes on that original file or somehow the code would not be perfect the clients will suffer and it may be that company lose their clients as well. Also, the company will lose its social belief. One more limitation can be like if they add some new feature to the application. At their end, there was not a single problem with that application but some bugs got alive when that application is being used in other systems. So, how to resolve this issue?


The solution can be like they can create some extra space where they can make a clone of that existing application and their community can make any changes and test that if that is working properly or not. But what if the running application has some issue and it must be resolved in less time so that clients don’t suffer. There is a number of developers who can help in resolving these issues. So, the best solution is that the company can make their code of that application open-source and allow the developers to make a clone of that application and make changes to that. The developer can create their own workspace where they work on that application so that the running application will not be affected. When it will confirm that the application runs smoothly on any platform and it is bug-free then only the running application can be replaced

Where and how to get those open source code?

So, here comes the use of Git and GitHub. GitHub is basically the repository from where we can get the open-source code and developers can make a contribution to improving that code. Git is a software that allows users to control this repository through the command line or we can say that gives us the facility of Source Code Management.

Important terms used in Git and GitHub

Commit Area: The storage, where we keep the created backup is called the commit area.

Working area: The storage, where developers work on the backup.

VCS(Version Control System): It is provided by the SCM tool to track the different versions of the application.

Rollback: To move to the previous version of any applications.

Staging area: The staging area is the storage where we keep the added or deleted lines in the existing committed file that needs to be tracked. After the use of this file, it will be kept in the backup area.

Snapshot: Snapshot is something like backup but not exactly. In it we don’t create a complete backup each time, we just backup the newly added lines at a point of time in the existing backup copy.

Feature branch: The branch which is separate and just created to add some new features to the existing code. This also shows that it has one backup of the master branch file but behind the scene, it is just referencing the file of the master branch. It is also called an upstream branch.

Merge: When the feature branch works perfectly, we just combine it with the codes in the master branch and it is called merging. It follows fast-forward strategy to merge the branches.

Timeline: In each branch, they have their different versions, maybe referenced or in real and this is known as a timeline.

Upstream Tracker: We just can’t go to the other branch to check if any changes made or not. So, we can add a tracker by the master branch on the other branches. Then master branch can easily pull all the changes made when it will show any changes are made.

Software used in the workshop

1. GitBash

2. GitHub

3. GitKraken

4. P4merge

Few hands-on commands used to work during the workshop

git — version

git init

git add file_name

git commit -m “comment” file_name

git status

git log

git reflog

git log — oneline

git checkout master

git checkout -b branch_name

git push GitHub_Directory_name master

git push GitHub_Directory_name branch_name

git show commit_id

git remote -v

git clone link_of_github_folder

git switch master

Hope you will like it.

To continue….