在 Xcode 中找不到 .pbxproj 文件

Can't find the .pbxproj file in Xcode

我的 .pbxproj 文件有问题。我在一台计算机上开发了一个 Xcode 项目,然后在另一台计算机上使用 SourceTree 克隆了它。但是现在我无法打开项目,因为 project.pbxproj 文件完全消失了。我没有将它添加到我的 .gitignore 文件中,当我在另一台计算机上处​​理该项目时,我从未遇到过任何问题。

为什么它消失了,有没有办法找回它?我在我的源代码中根本找不到它。即使我恢复到最初的提交也不行。会不会是当我将项目源代码推送到位桶时,我的 .pbxproj 文件没有提交?

有没有办法创建一个新的 .pbxproj 文件?我这里没有工作项目的电脑,它在我的办公室。

编辑: 包括我的 .gitignore 文件

# OS X Finder
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
#Pods/

好的,这是一个主要的 D'oh!时刻和我自己的错误。我发现我的电脑上有一个全局的.gitignore文件。在那个文件中,我出于某种原因添加了 project.pbxproj

所以现在可以了。笨笨笨笨...

  1. $defaults 写入 com.apple.finder AppleShowAllFiles -bool true
  2. 在取景器中显示
  3. 打开圈出的文件,删除包含project.pbxproj的行