The only information that Git stores from one revision to the next is the state (names and contents) of the files for each revision. In revision A, this file had this content, and in revision B, this file had different content. Git doesn't care how files got from point A to point B, be it editing or renaming, or resolving a conflict, or merging an octopus.
This approach has the advantage of a conceptually simple repository format. This is important because your repository is your story, and the story should be saved in the simplest format.
One consequence of this is that whenever Git needs to find out what happened between versions A and B (for example), it needs to figure out the details at the time you ask for it. Even for a simple distinction, while some tools may just show the internally stored diff, Git compares the files in revision A and B and regenerates the diff on demand. For renaming, Git notices that a new file has appeared and is looking for similar files in the previous version to guess whether the file has been renamed or not.
As Git tools improve over time, you can report more about how the story was formed, without having to record them at that time. For example, it is often argued that Git can "track individual bits of code moving from one file to another." This is due to the cleverness of programs reporting history, and not because of anything stored in the repository itself.
Greg hewgill
source share