Git compresses data into packfiles. So, even though in theory git is a storage mechanism for whole objects, in practice the objects are delta-compressed.
You can learn more about these packfiles from e.g. https://git-scm.com/book/en/v2/Git-Internals-Packfiles
The packing mechanism finds files that are similarly named in different versions, and have a size reasonably close to each other. It then concludes that these files are a good candidate for trying delta-compression, and the delta-compression is used if it had a measurable gain. If you change the entire contents of a file, git may conclude that delta-compression is not beneficial, and thus, the file is stored as-is. This differs significantly from older version control systems such as CVS (and perhaps SVN?) that always use delta-compression where the newest version of a file is stored as-is and the older versions are just the newest version minus deltas.
The delta-compression mechanism in git is able to utilize all CPU cores in the system by multithreading.