Git

An Open Source, Distributed Version Control System

Git is a fast, versatile, highly scalable, free, open-source VCS. Its primary author is Linus Torvalds, the creator of Linux.

  • Git is a distributed version control system that allows multiple developers or other contributors to work on a project. It provides a way to work with one or more local branches and push them to a remote repository.

  • Git is distributed, which means that a project's complete history is stored both on the client and on the server.

git

Git terminologies

  • Hash: A number produced by a hash function that represents the contents of a file or another object as a fixed number of digits. Git uses hashes that are 160 bits long. One advantage to using hashes is that Git can tell whether a file has changed by hashing its contents and comparing the result to the previous hash. If the file time-and-date stamp is changed, but the file hash isn’t changed, Git knows the file contents aren’t changed.

  • Object: A Git repo contains four types of objects, each uniquely identified by an SHA-1 hash. A blob object contains an ordinary file. A tree object represents a directory; it contains names, hashes, and permissions. A commit object represents a specific version of the working tree. A tag is a name attached to a commit.

  • Cherry pick in Git means to choose a commit from one branch and apply it onto another.

High-level Commands (porcelain)Low-level Commands (pumbling)

commands further divided into main and ancillary commands.

commands to support development of alternative procelain commands.

Last updated