Cloude Devops Logo Free Clss Will start on Devops from July 15th
Cloud DevOps
Cloud DevOps




Data structures of Git

Data structures in Git

Data structures

Git's primitives are not inherently a source-code management system. Torvalds explains:

In many ways you can just see git as a filesystem--it's content-addressable, and it has a notion of versioning, but I really designed it coming at the problem from the viewpoint of a filesystem person (hey, kernels is what I do), and I actually have absolutely zero interest in creating a traditional SCM system.

From this initial design approach, Git has developed the full set of features expected of a traditional SCM, with features mostly being created as needed, then refined and extended over time.

DevOps Lesson

Some data flows and storage levels in the Git revision control system

Git has two data structures:

a mutable index (also called stage or cache) that caches information about the working directory and the next revision to be committed; and an immutable, append-only object database.

The index serves as a connection point between the object database and the working tree. The object database contains five types of objects:

A blob

A blob (binary large object) is the content of a file. Blobs have no proper file name, time stamps, or other metadata. (A blob's name internally is a hash of its content.)

A tree

A tree object is the equivalent of a directory. It contains a list of file names, each with some type bits and a reference to a blob or tree object that is that file, symbolic link, or directory's contents. These objects are a snapshot of the source tree. (In whole, this comprises a Merkle tree, meaning that only a single hash for the root tree is sufficient and actually used in commits to precisely pinpoint to the exact state of whole tree structures of any number of sub-directories and files.)

A commit

A commit object links tree objects together into a history. It contains the name of a tree object (of the top-level source directory), a timestamp, a log message, and the names of zero or more parent commit objects.

A tag

A tag object is a container that contains a reference to another object and can hold added meta-data related to another object. Most commonly, it is used to store a digital signature of a commit object corresponding to a particular release of the data being tracked by Git.

A packfile

A packfile object is a zlib version compressed of various other objects for compactness and ease of transport over network protocols.

Each object is identified by a SHA-1 hash of its contents. Git computes the hash and uses this value for the object's name. The object is put into a directory matching the first two characters of its hash. The rest of the hash is used as the file name for that object.

Git stores each revision of a file as a unique blob. The relationships between the blobs can be found through examining the tree and commit objects. Newly added objects are stored in their entirety using zlib compression. This can consume a large amount of disk space quickly, so objects can be combined into packs, which use delta compression to save space, storing blobs as their changes relative to other blobs.

Additionally git stores labels called refs(short for references) to indicate to index the locations of various commits. They are stored in the reference database and are respectively :

Heads(branches): Named references that are advanced automatically to the new commit when a commit is made on top of them. HEAD: A reserved head that will be compared against the working tree to create a commit. Tags: Like branch references but fixed to a particular commit. Used to label important points in the history.










The DevOps seminar will help you to learn DevOps from scracth to deep knowledge of various DevOps tools such as fallowing List.

Linux, Git, Jenkins, Maven, Apache Tomcat, Nexus, Ansible, Chef, Docker, Nagios,   Kubernetes.


Continue to Next

Automation



                                                                                                                                    

Learn Latest Technologies

DevOps Tutorial

here you can write some thing...

DevOps Lesson

here you can write some thing...

DevOps Lesson

here you can write some thing...

DevOps Lesson

here you can write some thing...

DevOps Lesson

here you can write some thing...

DevOps Lesson

here you can write some thing...

DevOps Lesson

here you can write some thing...

DevOps Lesson

here you can write some thing...

DevOps Lesson

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

here you can write some thing...

Front
Back...!
Front
Back...!
Front
Back...!
Front
Back...!