Renaming One of Github Repo's 2 Directories That Have The Same Name


I would like to figure out a way to rename a directory under a Github repo that has another directory with the same name. I want to clone it locally but when I do so, It only clones one directory and leaves the other directory behind (meaning it doesn’t keep it). What I would like to do is to fork the repo, then rename one of the directories that have the same name so when I clone it locally both will be cloned. Any thoughts or suggestions on how to solve the problem above?

Thank you so much in advance.

You mean you’re trying to clone a repo that has (for example) both /images and /IMAGES or something like that?

That will probably work on a Linux system where things are treated case sensitively, however, it’ll probably fail on a Windows system where things are treated case insensitively.

1 Like

Hi @kingthorin,

Yes exactly. I am actually using macOS and it fails to recognised the two directories as two separate ones but I need to have both directories cloned. Any suggestions on how to handle this?

Thanks a lot.

1 Like

Unfortunately there aren’t a lot of great options:

  • Fire up a Linux VM?
  • Ask the project to restructure things?
  • Wait until CodeSpaces are out of Beta (or try to get in to the Beta).
1 Like

I have a similar situation. The cloud machine that builds and runs the code is Linux while the local development is done on our MacOS machines. You mentioned

  • Ask the project to restructure things?

Does that mean restructuring files and directories such that the MacOS style case-insensitive naming is followed? In other words, in any given directory, there be no two directories or files such that their names differ only in casing?

Yes that’s what I was suggesting. Though, don’t be surprised if you meet resistance or rejection :grinning:

1 Like

Sure! However, in my case, it’s a team of 5 with me being the maintainer. Thanks so much for this thread peeps! Looks like it has solved quite the mystery for me. :nerd_face: