Getting a software/application built has become as easy as opening a Gmail account. With millions of developers in almost every country, it’s easy to find the people you need to get your job done within the budget you desire. But one thing that’s guaranteed is that if you are to run your business efficiently, your software/application should also change with time and the time is running faster than ever.
Why am I talking about all of these? It’s simply because if you are planning to get an application built for your eCommerce business or for your company, then you need to know the basics of the development process.
I had already introduced you to the basics of DevOps with examples in my previous blog. This time, my inclination is towards letting you know how important Git is for your application since it enables any and every developer you hire to look at every stage from the beginning until they take over for further development.
In simple terms, Git is a software tool that we use to track the changes made to our software over time. It allows you to look back at the history of a software project and see what the code looked like 1 day, 1 year, or even 10 years in the past.
A fun fact; Git started in a bit of controversy as an act of revenge.
In 2002, the Linux community started to use the proprietary distributed version control system BitKeeper for free. But in 2005, the relationship between the Linux community and BitKeeper broke down when the free-use status was revoked. So Linus Torvalds, the creator of Linux, started to develop Git as an open-source product. That year, the first version of Git was released.
Reminds you of the Lamborghini scene, right? BTW, Git is the most popular version control system as of today.
But in order to understand Git, you need to know about two more things i.e Centralized Version Control System (CVCS) and Distributed Version Control System (DVCS).
A centralized version control system works on a client-server model. There is a single, (centralized) master copy of the code base, and pieces of the code that are being worked on are typically locked, (or “checked out”) so that only one developer is allowed to work on that part of the code at a time. Access to the code base and the locking is controlled by the server. When the developer checks their code back in, the lock is released so it’s available for others to check out.
Of course, an important part of any VCS is the ability to keep track of changes that are made to the code elements, and so when an element is checked in, a new version of that piece is created and logged. When everyone has finished working on their different pieces and it’s time to make a new release, a new version of the application is created, which usually just means logging the version numbers of all the individual parts that go together to make that version of the application.
More recently, there’s been a trend (or some might call it a revolution) toward distributed version control systems. These systems work on a peer-to-peer model: the code base is distributed amongst the individual developers’ computers. In fact, the entire history of the code is mirrored on each system.
There is still a master copy of the code base, but it’s kept on a client machine rather than a server. There is no locking of parts of the code; developers make changes in their local copy and then, once they’re ready to integrate their changes into the master copy, they issue a request to the owner of the master copy to merge their changes into the master copy.
With a DVCS, the emphasis switches from versions to changes, and so a new version of the code is simply a combination of a number of different sets of changes. That’s quite a fundamental change in the way many developers work, which is why DVCS’s are sometimes considered harder to understand than centralized systems.
What is Git
Git is a piece of software that allows you to perform version control. Large software projects require some piece of software to keep track of all the different changes made to a codebase in order to track things like: Who edited a certain file; what they changed; and how to get back to the original code if necessary. Git does all of these things and more, so it’s not surprising that most large software companies use git
This is the basic diagram of Git Concept,
Since the development and release of Git, it has gained huge popularity among the developers and being open source, it has incorporated many useful features. Today, a staggering number of projects use Git for version control, both commercially and personally. Let’s see why Git has become so popular by discussing its main features
- Fast: Git provides the best performance when it comes to version control systems. Committing, branching, merging all are optimized for a better performance than other systems. This means, there’s no need for any other powerful hardware.
- Security: Git handles your security with cryptographic method SHA-1. The algorithm manages your versions, files, and directory securely so that your work is not corrupted.
- Easier Branching: Git has a different branching model than other VCS. Git branching model lets you have multiple local branches which are independent of each other. Having this also enables you to have friction-less context switching (switch back and forth to the new commit, code and back), role-based code (a branch that always goes to production, another to testing etc) and disposable experimentation (try something out and if it does not work, delete it without any loss of code).
- Staging Area: Git has an intermediate stage called “index” or “staging area” where commits can be formatted and modified before completing the commit.
- Distributed: Git is distributed in nature. Distributed means that the repository or the complete code base is mirrored onto the developer’s system so that they can work on it independently.
- Open Source: This is a very important feature for any software present today. Being open-source invites developers from all over the world to contribute to the software and make it more and more powerful through features and additional plugins. This has led the Linux kernel to be a software of about 15 million lines of code.
What is the use of Git in Dev-Ops?
Now that you know what is Git, you should know Git is an integral part of DevOps. DevOps is the practice of bringing agility to the process of development and operations. It’s an entirely new ideology that has swept IT organizations worldwide, boosting project life-cycles and in turn increasing profits. DevOps promotes communication between development engineers and operations, participating together in the entire service lifecycle, from design through the development process to production support. The diagram below depicts the DevOps life cycle and displays how Git fits in DevOps.
In a world that is to be built by applications, Artificial Intelligence and automation, DevOps will be the backbone of all of these processes. Just like DevOps sees to it that the developers and operations team have the bond and transparency required, it is through writings like these that everyone would get to know what goes behind the workings of the technologies that we use.
Man must not be too away from understanding the functioning of things that they use in their day-to-day life. Codes might not be of any use to you, but knowing the process certainly is and that’s where the value we aim to provide you lies.
Stay tuned for more posts like this and if you have got any queries then your friendly professional is just a mail away at firstname.lastname@example.org