Logical Structure Of Git

  • DAG of commit objects

    • Leaf is initial commit

    • Roots are branch tops

  • Objects are crypto hashed to get IDs

  • Each commit refers to

    • Its "parents" (downward) commit id

    • The objects (files) included in the project at this point

  • Files are stored in object store by crypto hash for dedup

Structure Of A Git Repo

  • Object store

  • Refs

  • Index

  • Reflog

  • Config

Git Operations

  • Log

  • Commit

  • Branch

  • Adjust heads

Some Examples

  • Why fetch + merge is the new pull

  • Revising history; commit --amend and rebase and push -f

  • The reflog and recovery (but still make a copy of the repo)

Last modified: Monday, 12 October 2020, 1:53 PM