upvote
> Git knows that the file was renamed even without using git to do the rename.

No it doesn't. Git knows that file A was deleted and file B was created, and if they have the same content then it will guess that it was a rename. But it's a heuristic that doesn't always work. E.g. I think it doesn't try to guess for large diffs, and it doesn't work if you modify the file in the same commit.

reply
Right, if you rename a file and then change its content without committing it, it doesn't know. Clearly that's bad practice in a multi-user setting because you're going to break all subsequent merges.

However, if you just move or rename a file, git does recognize that, and it doesn't require any manually annotation.

Lore needs you to tell it that you're moving or renaming. It's not the end of the world, but it's a real pain if other tools are operating on the file. You will need to go back and manually annotate those operations if you want it to preserve the relationships.

reply