0

https://github.com/BerkeSoysal/TOON_BLASH/tree/master/Assets

in assets file there seems to be one scripts/ folder and one Scripts/ folder.

enter image description here

I want to resolve this mess (I want only Scripts/), but when I cloned the project there seems to be only one Scripts folder.

Terminal

How could I sync them?

codemonkey
  • 809
  • 1
  • 9
  • 21
  • There is Scripts the folder and scripts the meta file. There is no mess – BugFinder Dec 26 '21 at 19:27
  • @BugFinder no, the problem is: There is two sciprts folders in GitHub page (scripts, Scripts) but not when I cloned them into my local. – codemonkey Dec 26 '21 at 19:36
  • 1
    Does this solve your problem https://www.hanselman.com/blog/git-is-casesensitive-and-your-filesystem-may-not-be-weird-folder-merging-on-windows? – Alexandr Dec 26 '21 at 19:37

1 Answers1

1

Your issue is essentially that the file system on windows is not case sensitive, whilst GIT is. There are 2 folders with the same name but different capitalization in the repo.

You can either fix the error, for example by cloning the project on an OS that has a case sensitive file system, like linux and removing one of the folders.

I've done this in the past with Windows subsystem for linux (WSL) https://learn.microsoft.com/en-us/windows/wsl/

I'm using Azure devops so i've also renamed folders online to fix this kind of issue.

Another way is to enable case sensitivity for your specific folder on windows:

fsutil.exe file setCaseSensitiveInfo <path> enable

https://learn.microsoft.com/en-us/windows/wsl/case-sensitivity#modify-case-sensitivity

You'd wanna create a new folder, enable case sensitivity on that folder and then clone in your git repo in that folder. That way you should see 2 files. You can then correct your mistake by removing the file and changing the folder back to not be case sensitive, or you can leave it as-is.

I personally clone all my repose in subfolders under the path c:\repos so i've just set that folder to be case sensitive. It gets somewhat annoying sometimes with powershell commands (like for dotnet or nuget) now needing proper capitalization but it helps a lot when renaming folders in git repos.

EDIT: like @alexandr mentioned, you can also use git mv

git mv foo foo2
git mv foo2 FOO
git commit -m "changed case of dir"

https://stackoverflow.com/a/3011723/4122889

sommmen
  • 6,570
  • 2
  • 30
  • 51
  • Thanks, I solved it using git mv (I moved all files in scripts to Scripts). May be if you include this solution I can mark it as accepted. – codemonkey Dec 26 '21 at 19:49