DevOps
Git
Introduction

Git Introduction

Git is the world's most popular distributed version control system. It was designed to handle everything from small to very large projects with speed and efficiency.

🚀 Key Features of Git

Unlike older systems that track "deltas" (changes to files), Git tracks Snapshots. Every time you commit, Git takes a picture of what all your files look like at that moment.

  • Distributed: Every developer has a full copy of the project history.
  • Speed: Most operations are local, making them near-instant.
  • Data Integrity: Everything in Git is checksummed using SHA-1, ensuring your history cannot be altered without detection.
  • Branching: Created to handle heavy branching and merging as a primary workflow.

Why Git?

Git has become the foundation of DevOps because it enables a "Code as Truth" philosophy. It powers:

  1. CI/CD Pipelines: Automated builds triggered by Git commits.
  2. Infrastructure as Code (IaC): Managing your servers using Git-tracked scripts.
  3. Collaboration: Allowing hundreds of developers to work on the same project via GitHub, GitLab, or Bitbucket.

Data Flow (Peer-to-Peer)

In Git, there isn't just one central pool of code. Information flows between peer repositories.


[!NOTE] Open Source Heritage Git was created by Linus Torvalds in 2005 for the development of the Linux kernel. It is completely open-source and free to use.