I've moved a bunch of files around manually without thinking, and can't find a way to get git to recognize that the files are just moved and not actually different files. Is there a way to do this other than removing old and adding the new (and thus losing the history), or redoing all the changes with git-mv?
I think it already does this. Now, I could be wrong, but I've read that git tracks files based on their contents not based on their position in the file system or based on delta/differences. In the stack I think it shows it as if the files are being removed and the then re-added, but I think I've tried this once and it still maintained the history, due to the aforementioned way that git tracks things. Still would be helpful for someone to verify if I'm correct or not. Sorry if I misunderstood your question. |
|||||||||||||||||||||
|
To have git remove files that are removed or moved already, just enter
|
|||||||||||||||||
|
If you want to see moves in
To find copies as well as renames you can use the
Note, that as git doesn't store file history (only commit history), even if you did |
|||||
|
To better understand why Git does do rename detection instead of (more common) explicit rename tracking, and how |
|||
|
git mv
. – Warren Dew Mar 16 '14 at 22:08