Wednesday, April 22, 2026

GIT Basics



 GitHub: It is a cloud based platform which provides distributed version control and source management system.

Alternative source mangement system:

  • Github
  • Bitbucket
  • GitLab
  • SVN
GIT Algorithm:
It will hash out of content (produces 40 char hex string)
It will create a file name same as hash
Zip up with your content and stored inside of file.
#git add test.txt
#cat test.txt | git hash-object --stdin
blob:
It is convert a file into hash file.
Hash algorithm will create a hash file according the file contents. It will not create a two dfferent hashing file if both both files are having a same contents.
#git write-tree : It will display the tree structure of GIT
#git cat-file -p hashfile : Read a content inside of hashfile
Git Commit:

Commit is a copy of snapshot. It will create a read only file whenever we performed a commit. The previous content or update will be there and would not be destroyed,
Merkle Tree: A tree structure in which each leaf node is a hash of a block data and non leaf node is a hash of its children.
Head:

Merge:
It merge one or more commit into branch.



No comments:

Post a Comment