Quantcast
Channel: Cloud Training Program
Viewing all articles
Browse latest Browse all 1891

Git | Version Control System | Git Workflow | Advantages

$
0
0

Loading

Git is a Distributed Version Control System, and it is one of the most popular version control tools that is being used by 90% of the world’s IT companies.

In this blog, we are going to cover what is a Version Control System, Git Workflow, and the Advantages of using Git.

If you want to know more about DevOps certification please go through our previous blog on [DOFD] DevOps Foundation Certification Exam and everything you need to know about it.

Index:

  1. Git Overview | Version Control System
  2. Git Workflow
  3. Advantages of Git

Git Overview | Version Control System

Git is a Distributed Version Control System and hence, it provides all the facilities of a Distributed Version Control System that we are about to discuss.

git logo

Version Control System(VCS) is a software that helps developers to work together and maintain a history of their work. You don’t have to maintain multiple copies of code on your computer as Version Control System manages all versions of your code efficiently.

There are two types of Version Control System in DevOps:

  1. Centralized Version Control System(CVCS)
    It uses a central server to store all versions of your code and enables team collaboration. Every developer can copy(check out) a specific version of code on to their computer and then modify it and commit changes to the server.
    A major drawback of this approach is its single point of failure, that is, the central server.
  2. Distributed Version Control System(DVCS)
    In this, every developer has a local copy of the main repository on their computer so if the server goes down then the repository from any client can be copied back to the server and restored.
    Every checkout is a full backup of the repository.

centralized vs distributed VCS

Git Workflow

Git has a 3 layered workflow and these layers describe the different states that your files can reside in.

  1. Working directory: This is your local machine.
  2. Staging area or Index: This is an intermediate saving area.
  3. Git repository: This is your Git repository or central server.

basic git workflow

How Basic Git Workflow Works?

  • The working directory is where all your files are present, where you make changes in your files.
  • The staging area is an intermediate layer where you stage those changes that you want to be part of your next commit, so you add only those changes to the staging area.
  • Once you commit, it takes these files from the staging area and stores them permanently to the Git repository.

Advantages of Git

  1. Free and open-source: No need to purchase and can be used anywhere.
  2. Fast and small: No need to connect to the central server. All the operations can be performed on the local copy stored on the developer machine making it really fast.
  3. Implicit backup: Every checkout is a full backup of the repository, hence multiple copies are available.
  4. Security: Git uses SHA1 algorithm to secure the data stored within the repository.
  5. Easy branching: Git branches are easy and cheap to merge. Every small change to your code creates a new branch.

Related/References

Next Task For You

In our [DOFD] DevOps Foundation Training, we cover Git Introduction, Installation, Setup and, much more in Git & GitHub module. In this training, we also cover the Introduction to DevOps, DevOps Principle, DevOps Practices, Ansible, Docker, Jenkins.

Begin your journey towards becoming DevOps Foundations certified and earning a lot more in 2023 by joining our FREE Class.

Click on the below image to Register for the FREE CLASS Now!

The post Git | Version Control System | Git Workflow | Advantages appeared first on Cloud Training Program.


Viewing all articles
Browse latest Browse all 1891

Trending Articles