bookmate game
en

Rasmus Voss

  • Diego Ormazábalцитирапреди 7 месеца
    Git is different; instead of the regular file and patches list, Git records a snapshot of all the files tracked by Git and their paths relative to the repository root, that is, the files tracked by Git in the file system tree.
  • Diego Ormazábalцитирапреди 7 месеца
    The way Git references the files and directories it tracks is directly built into the data model.
  • Diego Ormazábalцитирапреди 7 месеца
    Git's object storage is a key-value storage, the key being the ID of the object and the value being the object itself. The key is an SHA-1 hash of the object, with some additional information such as size.
  • Diego Ormazábalцитирапреди 7 месеца
    There are four types of objects in Git, branches (which are not objects, but are important), and the special HEAD pointer that refers to the branch/commit currently checked out.
  • Diego Ormazábalцитирапреди 7 месеца
    Files, or blobs as they are also called in the Git context
    Directories, or trees in the Git context
    Commits
    Tags
  • Diego Ormazábalцитирапреди 7 месеца
    We can verify that this is the latest commit by running git log -1
  • Diego Ormazábalцитирапреди 7 месеца
    Normally, it is not used in everyday Git commands, but it is quite useful to investigate how it ties together the objects. We can also verify the output of git cat-file, by rehashing it with the Git command git hash-object; for example, if we want to verify the commit object at HEAD (34acc370b4d6ae53f051255680feaefaf7f7850d), we can run the following command:
  • Diego Ormazábalцитирапреди 7 месеца
    The special notation HEAD^{tree} means that from the reference given, (HEAD) recursively dereferences the object at the reference until a tree object is found.
  • Diego Ormazábalцитирапреди 7 месеца
    The add command, generally speaking, moves files from the working directory to the staging area, but more than this actually happens, though you don't see it.
  • Diego Ormazábalцитирапреди 7 месеца
    When a file is moved to the staging area, the SHA-1 hash of the file is created and the blob object is written to Git's database.
fb2epub
Плъзнете и пуснете файловете си (не повече от 5 наведнъж)