Btw did you guys know that git stores an entire snapshot of files on every commit. I always kinda thought it stored changes.
Cross Code
Btw did you guys know that git stores an entire snapshot of files on every commit. I always kinda thought it stored changes.
First lets talk about trees and blobs:
A blob is where file contents are stored and each file contents are store in a unique blob.
A tree represent a directory and it contains blobs and a pointer to trees if it is not first commit. git store a unique tree per ccommit. this does not mean it stores the entire file. what it does is store every reference to the files.
So if a file is unchanged, the same blob will be used across different commits.
At least that's how I understand it.
A blob is where file contents are stored and each file contents are store in a unique blob.
A tree represent a directory and it contains blobs and a pointer to trees if it is not first commit. git store a unique tree per ccommit. this does not mean it stores the entire file. what it does is store every reference to the files.
So if a file is unchanged, the same blob will be used across different commits.
At least that's how I understand it.
Cross Code
First lets talk about trees and blobs: A blob is where file contents are stored and each file contents are store in a unique blob. A tree represent a directory and it contains blobs and a pointer to trees if it is not first commit. git store a unique treeβ¦
Also git compresses blobs and trees for efficient storage.
Cross Code
First lets talk about trees and blobs: A blob is where file contents are stored and each file contents are store in a unique blob. A tree represent a directory and it contains blobs and a pointer to trees if it is not first commit. git store a unique treeβ¦
Using
helped me to understand how things are stored and stuff in git
git cat-file -p
helped me to understand how things are stored and stuff in git