If I move files within a repository, such as from one folder to another, will git be smart enough to know that these are the same files and merely updates its reference to these
The git repository distinguishes files by checksum, not by name or location. If you commit, and then move a file to a different location and commit, the file in the before location and the file in the after location have the same checksum (because they have the same content). Therefore the repository does not store a new "copy" of the file; it merely records the fact that a file with this checksum now has the second location.