Why Should You Use a Version Control System?
Think about an Cloud Foundry application. This application, with its different modules (SAP HANA database modules, UI, and control flow modules), consists of a number of files, organized in different folders.
Watch this video to learn about a typical scenario in Version Control.
Now, suppose the last released version of the application is V2.1.0, and you are currently preparing new features for the upcoming minor release V2.2.0, which is scheduled to release in a few weeks. You might have imported the MTA project in your SAP Business Application Studio workspace and started developing the new features that are planned for V2.2.0. This development means that there are new files, as well as modifications to existing files, and maybe the deletion of a few existing files as well.
At some point, you receive an important e-mail from support saying that a bug in V2.1.0 needs an urgent fix. This cannot wait until the next minor version, and requires a patch (V2.1.1).
So, how do you handle this request? At the moment, your current development is not finished or tested, but you need to patch your version 2.1.0. Of course, you want to start from the last release (you do not want to include any part of the future functionality into the patch), but your patch might affect some files that you already modified as part of the development of new features.
This is where a version control system comes into play. It allows you to keep a complete change history by using milestones during the development of your code, at a very fine-grained level if necessary. You can also branch your code, which means, you can develop and test different features in different parallel development threads (branches). If a feature branch is good to go, you can merge this branch with the main branch. If it is not, you can continue your development, or even get rid of this branch if you realize that a development option for a feature was not relevant and you need to think about it again.
Key Benefits of a Version Control System
The following are the key benefits of using a version control system:
Source code backup
A complete change history
Branching and merging capabilities
Traceability (for example, connecting a change to project management software)
To learn more about version control systems, view the following page: https://www.atlassian.com/git/tutorials/what-is-version-control.
Git in a Nutshell
Git is a Distributed Version Control System (D-VCS) used to manage source code in software development, or more generally to manage the lifecycle of any set of files.
It allows one or several developers to work locally with their own copy of the Git repository, which contrasts with a traditional client/server architecture.
The architecture of Git is distributed. It is somewhere between purely local and purely central. A local architecture would make it difficult to several developers to collaborate. A centralized one allows collaboration, but in some cases, a developer need to block a piece of code on the central repository while working on it.
Instead of this, Git is designed so that every developer can keep the entire history of a project (or only a part of it, depending of their needs), locally on their computer.
Git is a free software distributed under GNU GPL (General Public License).
The Git Architecture
Watch this video to learn about the Distributed Git Architecture.
In a classical Git architecture, developers work in a local repository on their computer, and connect on a regular basis to a central repository to share their contribution and get the contribution from other developers on the project.
Git can also easily support several remote repositories for a single project. If needed, it is possible for a sub-team of developers to have their own sub-team repository to collaborate, and synchronize their changes with the central repository when needed.
The shared Git repositories can be hosted on the own company’s IT infrastructure, or on Git hosting services such as GitHub (one of the most popular), Helix (Perforce), Bitbucket (Altassian), and many more. A lot of companies offering Git hosting services also provide additional services such as code review or issue tracking.
The Key Benefits of Git
Git has been designed with security, flexibility, and performance in mind. Almost every operation is performed locally. The branching model provides an extreme flexibility.
To lean more about Git, go to: https://git-scm.com/.