Git is a distributed revision control and source code management.

Every Git working directory is a full-fledged repository with complete history and full version tracking capabilites.

Independent of network access

Independent of a central server

 

Support for non-linear development: rapid branching and merging

=> branches are light weight

=> a branch contains a reference to a single commit and the parent commit


Git only cares about the contents of files - not metadata data like time-stamps


only one .git folder


Note: A hash points to a node in the tree.


DAG- Directed Acyclic Graph

Nodes and directional arrow

 

id:ABABABAB

tree:9ABDHF

parent: nil

author:Fred

Committer:Bob

Commit messager

 

ID:BDEBDE

tree:4DFGHD

parent:ABABABAB

author:Shubert

Comitter: ....

Commit message


tree .git/refs -L 1


.git folder

objects/

hooks/

refs/

refs/heads

refs/remotes

refs/tags

 

rr-cache/

info/

logs/

COMMIT_EDITMSG

description

HEAD

MERGE_RR

ORIG_HEAD

config

 

 


A hash is combition of a blob / tree / commit/ tag

blob- series of bytes

trees  (like a sub directory)- hold blobs and trees

commit (hash)

tag

 

Note:

/.git/

    HEAD    :  refs/heads/master

 

/refs/heads/master   : 087686564 <- hash code


heads

     refer to an object locally

remotes 

     refer to an object which exists in a remote repository

stash

    refers to an object not yet committed

meta

    a configuration


Hash

Text gets hashed 50 hex characters. A treeish.

 

 


help.github.com