Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Duplicated folders in github

Tags:

git

github

I have an app that is been tracked using git and the repository is hoted on github.

In my local computer the folders and files are these:

enter image description here

When I see the app in Github I see the folder TulpepWebSite duplicated.

enter image description here Why this could happen?

like image 410
Ricardo Polo Jaramillo Avatar asked Aug 24 '12 17:08

Ricardo Polo Jaramillo


People also ask

Can you delete folders in GitHub?

You can delete an individual file or an entire directory in your repository on GitHub. People with write permissions can delete files or directories in a repository.

How do I delete multiple folders in Git?

Just run the rm command with the -f and -r switch to recursively remove the . git folder and all of the files and folders it contains. This Git repo remove command also allows you to delete the Git repo while allowing all of the other files and folder to remain untouched.


1 Answers

Git is case-sensitive, but Windows is not. So, the two directories aren't duplicates in Git's view.

If you renamed TulpepWebsite to TulpepWebSite sometime in the past, then all the files which were under TulpepWebsite would have been tracked by git under that old name, while any new files you added would be tracked under the new name.

To fix this, I'd just git-mv the folder to something else, commit, then git-mv it back to the old name and commit again. This will hopefully force all of the paths to use a consistent case.

like image 130
nneonneo Avatar answered Sep 18 '22 08:09

nneonneo