2

我有一个带有Components文件夹的 git 存储库。此文件夹已重命名为,components但由于该文件夹已经在存储库中,因此不会在原始存储库中重命名。

如何重命名原始存储库中的文件夹?

4

2 回答 2

1
git mv <old name> <new name>
git commit "Componetens -> components"
git push
于 2014-07-21T14:08:11.360 回答
0

If you already renamed your folder, without telling git (through a proper git mv), you can

git delete Components
git add components
git commit -m "rename Components folder to components"
git push

The trap is to add to the index a second folder "components", which a case insensitive OS like Windows would have a hard time displaying, since it wouldn't be able to check out both "Components" and "components".

于 2013-07-07T14:49:21.657 回答