unity meta file inconsistent casing renaming script

Hello,

I have renamed two scripts in visual studio and since then this same warning appears/ executes when I clone my project from git.

Both of my scripts get renamed to their old name in the Unity project but they keep their new name in visual studio causing my scenes to give errors.
6325482--701559--old name.PNG
6325482--701565--new name.PNG

I currently don’t have the warning because it doesn’t show up every time but it goes something like: ‘unity meta file inconsistent casing renaming GameObjectRaycastBehaviour to GameObjectRaycastbehaviour’

I already tried to delete the meta files and then rename the scripts and I completely removed the scripts and added them back again but both didn’t work.

I also don’t know if this is the right location to post this question so i’m sorry if I should’ve posted this in another subforum.

Does someone know a solution to stop this automatic renaming that is done by Unity (Using Unity 2020 1.3f)?

You may be running into a git case-sensitivity conflict. See https://docs.microsoft.com/en-us/azure/devops/repos/git/case-sensitivity?view=azure-devops

That link is slightly Azure-centric but the concept is the same. I think I’ve solved these issues in the past using git mv -f <conflicting name> <non-conflicting name>

Which git tool did you use for that because I think Github desktop doesn’t support this.

I use the command line.