Could somebody explain how git knows internally that files X, Y and Z have changed? What is the process behind the scenes that recognizes when a file has not yet been added or h
https://codewords.recurse.com/issues/two/git-from-the-inside-out
Git is built on a graph. Almost every Git command manipulates this graph. To understand Git deeply, focus on the properties of this graph, not workflows or commands.
The user sets the content of
data/number.txt
to2
. This updates the working copy, but leaves the index andHEAD
commit as they are.The user adds the file to Git. This adds a blob containing 2 to the objects directory. It points the index entry for
data/number.txt
at the new blob.