There is a useful tool for Mercurial called the "ConvertExtension." It allows you to essentially rewrite the entirety of a repository's history. For example, if you have a file "foo.txt" in your root folder, but you want it to have been in the folder "root/bar/," you could use "hg convert" to change history to make it appear that it had always been in the "/bar/" folder.
Does an equivalent tool exist for git?