Cjku/git/backgound knowledge: Difference between revisions

 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Commit graphs==
==Commit graphs==
[[Figure: XXXX a figure need here to explain DAG]]
[[File:Gitdag.png|center|thumb|400px|Directed acyclic graph]]
 


Git chooses directed acyclic graph (DAG) as commit tree pattern. Regards to DAG, you may refer to [http://en.wikipedia.org/wiki/Directed_acyclic_graph Wikipedia::DAG]. Here is brief version:
Git chooses directed acyclic graph (DAG) as commit tree pattern. Regards to DAG, you may refer to [http://en.wikipedia.org/wiki/Directed_acyclic_graph Wikipedia::DAG]. Here is brief version:
# Directed  - all edges are one-direction.
# Directed  - all edges are one-direction.
# simple cycle, also called a circle or polygon - That means departure from a vertex, with no repetitions of vertices and edges allowed, there is no path lead back to the origin.
# Acyclic - That means departure from a vertex, with no repetitions of vertices and edges allowed, there is no path lead back to the origin.


Git commit graph is DAG, and this graph consists of commit object, tee object and blob object. Symbolic refs, such as HEAD/ORIG_HEAD, or refs, branch and tag, are not part of a commit graphs. They just refer to commit graph. Generally speaking, a symbolic ref refers to a ref; a ref refers to a commit object.
Git commit graph is DAG, and this graph consists of commit object, tee object and blob object. Symbolic refs, such as HEAD/ORIG_HEAD, or refs, branch and tag, are not part of a commit graphs. They just refer to commit graph. Generally speaking, a symbolic ref refers to a ref; a ref refers to a commit object.
Confirmed users
1,643

edits