Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Cloned project from GitHub missing a folder

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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?

>Solution :

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://docs.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://docs.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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading