1

I'm working on a repo on GitHub and I'm seeing an odd behavior, I'm probably missing something here. When I open the repo on the website, I see an "APIS" folder that isn't supposed to be there:

enter image description here

The only folder should be the "APIs" folder. If I clone the repo, that "APIS" folder isn't actually there (as I remember renaming it a while ago, even if it's still there on the website).

enter image description here

So, my questions are:

  • Why is it that I'm not seeing that erroneous "APIS" folder when cloning the repo, even though I see it on the website?
  • How do I get rid of that folder and merge the contained files into a single "APIs" folder, just like I have on my PC after cloning the repo?

If it helps, this is the link to the repo: https://github.com/Sergio0694/NeuralNetwork.NET/tree/master/NeuralNetwork.NET.Cuda

Thanks for your help!

Community
  • 1
  • 1
Sergio0694
  • 4,447
  • 3
  • 31
  • 58
  • 1
    Isn't Windows screwing up and merging the directories, since it is not case-sensitive by default? – Quentin Dec 23 '17 at 21:54
  • This is probably the result of working with `git` on a case insensitive filesystem. See [this question](https://stackoverflow.com/questions/17683458/how-do-i-commit-case-sensitive-only-filename-changes-in-git) for some information on dealing with that. – larsks Dec 23 '17 at 21:54
  • maybe you can rename directory to something else and then push to github then change it to 'APIs' folder and push – harsh zalavadiya Dec 23 '17 at 21:56

1 Answers1

1

You are on Windows. And Windows treats APIs and APIS the same. So git is overwriting your APIS folder on checkout with APIs.

See: File paths in Windows environment not case sensitive?

To get rid of the folder you will need to checkout the folder on Linux (or an OS without this behavior), and then delete the folder there.

I cloned it on Linux, and it had both folders. You might also try Windows Bash prompt which uses Windows Subsystem for Linux, and it also has the case sensitive behavior you need (which I also verified). Just install git inside the Ubuntu Bash Windows Shell, via sudo apt-get install git.

EdH
  • 3,194
  • 3
  • 21
  • 23
  • I'll try that. But I don't understand, why is this only happening in that folder? If you go to the NeuralNetwork.NET folder, you'll find another APIs folder with all the right content there. Why is this APIS wrong folder only present in the .Cuda project, is that just by chance? – Sergio0694 Dec 23 '17 at 22:29