【问题标题】:Xcode .gitIgnore showing shows files with ignored folderXcode .gitIgnore 显示带有忽略文件夹的文件
【发布时间】:2019-06-21 01:49:19
【问题描述】:

我试图解决这个问题

  1. 删除所有 pod 并重新安装
  2. 清理构建文件夹
  3. 删除 .gitignore 并重新创建

但是,Pods 目录中仍有一些文件会继续显示

自从我最初提交以来,我忽略了在我的 .gitignore 中使用它 - 从未提交过任何内容。

Pods/

请注意,这只是最近才开始使用新的 pod 更新

当我尝试提交时,我得到以下信息。

此目录中的所有其他 pod 都将被忽略。

我看过这些,但没有运气修复

.gitignore ignoring whitelisted folder

.gitignore not ignoring folder

Gitignore not ignoring folders

.gitignore doesn't ignore files

这看起来可能有解决方案,但不确定我是否想尝试,所以决定发布并了解发生这种情况的原因

gitignore does not ignore folder

注意:运行 Swift 4.2 / Xcode 10.1

【问题讨论】:

    标签: xcode git gitignore


    【解决方案1】:

    您正在跟踪这些文件,以便将它们添加到索引中。在忽略这些文件之前,您需要做的就是取消跟踪它们。 如果您想从索引中删除它们,您必须输入 git rm -r --cached {name_folder} 然后使用 git commit -m "removed files from index" 并更改您的 .gitignore 文件。

    【讨论】:

      猜你喜欢
      • 2022-11-16
      • 2016-12-25
      • 1970-01-01
      • 1970-01-01
      • 2021-09-29
      • 2021-09-24
      • 1970-01-01
      • 2015-05-23
      • 2012-04-30
      相关资源
      最近更新 更多