3 ms·
Git does not store changes it stores a tree with the whole state of the repo for every commit. This tree has references to the files, when a file is changed a n
by federiconafria 3y ago
Git does not store changes it stores a tree with the whole state of the repo for every commit. This tree has references to the files, when a file is changed a new copy is always added and the new commit will reference the new tree with the reference to the new file.
When you ask git for a diff it compares the trees and when there is a difference it compares the files the trees reference and it shows you a diff.
Git does not store diffs, it stores file trees.