github中的重复文件夹 [英] Duplicated folders in github

查看:73
本文介绍了github中的重复文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用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:

当我在Github中看到该应用程序时,我看到文件夹TulpepWebSite已重复.

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

为什么会发生这种情况?

Why this could happen?

推荐答案

Git区分大小写,但Windows不区分大小写.因此,这两个目录在Git的视图中不是重复的.

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

如果您过去某个时候将TulpepWebsite重命名为TulpepWebSite,则git将使用该旧名称来跟踪TulpepWebsite下的所有文件,而使用新名称来跟踪您添加的任何新文件.

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.

要解决此问题,我只是将文件夹git-mv改成其他名称,然后将git-mv改回原来的名称.希望这将强制所有路径使用一致的大小写.

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

这篇关于github中的重复文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆