Question #232

Author: admin
tags: Git  
Some Git repository consists of a single .mp4 video file with size of 5 MB.
Some strange user opened this video file in a text editor, manually added 1 kB of non-repeating (poorly compressible) text to the end of the file.
Next, the user saved the file and made a commit in Git.
How much has the .git directory size increased in this project?
Approximately 1 kB
Approximately 5 MB + 1 kB
Git is NOT a delta-based version control system.
Every time you commit, Git basically takes a picture of what all your files look like at that moment and stores a reference to that snapshot.
To be efficient, if some file has not changed, Git doesn’t store the file again, just a link to the previous identical file it has already stored.
It is worth noting that internally Git can use the packfile format for storage file "copy", which uses deltas. Run git gc to optimize the local repository.
Rate the difficulty of the question:
easyhard