在一个分支中创建的文件在另一个分支中以红色显示为缺失

时间:2016-11-07 12:49:49

标签: ios xcode git

我在新分支中创建了一些新文件并提交了更改。在我切换回主分支后,文件被红色标记为缺失,并且它阻止编译应用程序。如何解决问题。谢谢。

<unknown>:0: error: no such file or directory: '/Users/romansiro/Desktop/GOPASSApp/GOPASS/GOPASS/SimpleCell.swift'
<unknown>:0: error: no such file or directory: '/Users/romansiro/Desktop/GOPASSApp/GOPASS/GOPASS/LevelSelectionCell.swift'
<unknown>:0: error: no such file or directory: '/Users/romansiro/Desktop/GOPASSApp/GOPASS/GOPASS/ShareButton.swift'
<unknown>:0: error: no such file or directory: '/Users/romansiro/Desktop/GOPASSApp/GOPASS/GOPASS/CalendarViewController.swift'
<unknown>:0: error: no such file or directory: '/Users/romansiro/Desktop/GOPASSApp/GOPASS/GOPASS/PostHeader.swift'
<unknown>:0: error: no such file or directory: '/Users/romansiro/Desktop/GOPASSApp/GOPASS/GOPASS/SeasonSelectionCell.swift'
<unknown>:0: error: no such file or directory: '/Users/romansiro/Desktop/GOPASSApp/GOPASS/GOPASS/LikeButton.swift'
<unknown>:0: error: no such file or directory: '/Users/romansiro/Desktop/GOPASSApp/GOPASS/GOPASS/AltitudeChartCell.swift'
<unknown>:0: error: no such file or directory: '/Users/romansiro/Desktop/GOPASSApp/GOPASS/GOPASS/ActiveLevelCell.swift'
<unknown>:0: error: no such file or directory: '/Users/romansiro/Desktop/GOPASSApp/GOPASS/GOPASS/LoadingFooter.swift'
<unknown>:0: error: no such file or directory: '/Users/romansiro/Desktop/GOPASSApp/GOPASS/GOPASS/PostCell.swift'
<unknown>:0: error: no such file or directory: '/Users/romansiro/Desktop/GOPASSApp/GOPASS/GOPASS/ChartView.swift'
Command /Applications/Xcode 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

1 个答案:

答案 0 :(得分:1)

在提交代码时始终确保您始终提交文件project.pbxproj这是包含与添加文件相关的信息的文件,如果您还没有提交此文件,那么您将收到此错误,即添加文件不见了。