gpt4 book ai didi

Git 问题 : Newly added folders are showing untracked

转载 作者:行者123 更新时间:2023-12-03 05:45:01 25 4
gpt4 key购买 nike

我克隆了一个空的 git 存储库。我已经把我的整个 xcode 应用程序放在了。现在我想将这些项目推送到服务器,然后它显示文件夹未跟踪。

请查看随附的屏幕截图。该文件夹包含多个文件和子文件夹。

enter image description here

最佳答案

如前所述,您需要在推送之前进行 git add/git commit。

但是,如果 ECGame 内容 是您想要的,则您需要将所述内容复制到空的克隆存储库中,而不是文件夹本身。
如图所示,如果您添加/提交/推送,您的远程存储库将包含文件夹 ECGame/,而不是直接包含其文件。

如果某些文件即使在git add之后仍然未被跟踪,那么是的,core.precomposeUnicode可能有帮助:

When false, file names are handled fully transparent by Git, which is backward compatible with older versions of Git.

但最新版本的 Git 不需要它。
正如“Git Tower / Untracked files with unicode names”中所解释的:

The default for this config setting on OS X is true and there should be no reason to override it.
Note that the setting is also important when sharing repos between Macs.

Once a file name has been added in decomposed form to a Git repository, the only way of solving the problem is to remove these files from Git and re-add them with core.precomposeunicode set to true on Mac OS X or perform this action on Linux or Windows.

To recap, if you have problems with unicode file names showing up as untracked:

  • Make sure core.precomposeunicode is globally set to true on OS X

     $ git config --global core.precomposeunicode
    => true
  • All files still shown as untracked need to be removed from and re-added to Git.

关于Git 问题 : Newly added folders are showing untracked,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59476607/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com