It’s surprising how little we know about Git as we continue to dive into Git from the Bottom Up, while Michael confuses himself, Joe has low standards, and Allen tells a joke.
The full show notes for this episode are available at https://www.codingblocks.net/episode191.
Thanks for all the great feedback on the last episode and for sticking with us!
abc.txt
and another was named passwords.bin
in separate directories, they’d point to the same blob.This is worth following along and trying out.
git hash-object filename.
git cat-file -t hashID
will show you the Git type of the object, which should be blob.git cat-file blob hashID
will show you the contents of the file.git ls-tree HEAD
will show the tree of the latest commit in the current directory.git rev-parse HEAD
decodes the HEAD
into the commit ID it references.git cat-file -t HEAD
verifies the type for the alias HEAD
(should be commit).git cat-file commit HEAD
will show metadata about the commit including the hash ID of the tree, as well as author info, commit message, etc.find .git/objects -type f
and you’ll see the same IDs that were shown in the output from the previous Git commands.git log
will fail because nothing has been committed to the repository.git ls-files --stage
will show your blob being referenced by the index. .git/index
file.git write-tree
will take the contents of the index and write it to a tree, and the tree will have it’s own hash ID. write-tree
command is used to take the contents of the index and write them into a new tree in preparation for a commit.Dateline NBC
Current and classic episodes, featuring compelling true-crime mysteries, powerful documentaries and in-depth investigations.
Death, Sex & Money
Anna Sale explores the big questions and hard choices that are often left out of polite conversation.
Stuff You Should Know
If you've ever wanted to know about champagne, satanism, the Stonewall Uprising, chaos theory, LSD, El Nino, true crime and Rosa Parks, then look no further. Josh and Chuck have you covered.