我昨天将Xcode更新为Xcode 8.0,我的项目不会提交。当我去Source Control>提交:它没有显示文件,所以我无法按下提交按钮。
以下是它的样子:
这就是我的“git status”所说的:
On branch Master 你的分支领先于'Github / Master'一次提交。 (使用“git push”发布您的本地提交) 未提交更改的更改: (使用“git add ...”更新将提交的内容) (使用“git checkout - ...”放弃工作目录中的更改)
modified: MyProject.xcodeproj/project.pbxproj
modified: MyProject.xcodeproj/xcuserdata/SkkN.xcuserdatad/xcschemes/MyProject.xcscheme
modified: MyProject/AppDelegate.swift
modified: MyProject/AuthenticationController.swift
modified: MyProject/BaseController.swift
modified: MyProject/Button.swift
modified: MyProject/Checklist.swift
modified: MyProject/ChecklistCell.swift
modified: MyProject/ContentCell.swift
modified: MyProject/ContentsList.swift
modified: MyProject/ControlBar.swift
modified: MyProject/DashboardController.swift
modified: MyProject/DescriptionView.swift
modified: MyProject/DropdownMenu.swift
modified: MyProject/DropdownMenuCell.swift
modified: MyProject/IconLabel.swift
modified: MyProject/ImageButton.swift
modified: MyProject/Info.plist
modified: MyProject/Label.swift
modified: MyProject/MenuCell.swift
modified: MyProject/NavigationBar.swift
modified: MyProject/NavigationMenu.swift
modified: MyProject/NotificationBar.swift
modified: MyProject/NotificationsButton.swift
modified: MyProject/PopUp.swift
modified: MyProjectHoop/ProfileController.swift
modified: MyProject/ProfileTab.swift
modified: MyProject/ProfileTabsView.swift
modified: MyProject/StorageCell.swift
modified: MyProject/StorageChart.swift
modified: MyProject/StorageView.swift
modified: MyProject/SummaryCell.swift
modified: MyProject/SummaryView.swift
modified: MyProject/TextButton.swift
modified: MyProject/TextField.swift
modified: MyProject/Tools.swift
未跟踪的文件: (使用“git add ...”包含将要提交的内容)
.gitattributes
.gitignore
MyProject.xcworkspace/
MyProject/Activity.swift
MyProject/ActivityLog.swift
MyProject/ActivityLogCell.swift
MyProject/Assets.xcassets/ActivityDayIcon.imageset/
MyProject/Assets.xcassets/ActivityFirstDayIcon.imageset/
MyProject/Assets.xcassets/ActivityIcon.imageset/
MyProject/Assets.xcassets/AppIcon.appiconset/Icon-40.png
MyProject/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png
MyProject/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png
MyProject/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png
MyProject/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png
MyProject/Assets.xcassets/AppIcon.appiconset/Icon-76.png
MyProject/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png
MyProject/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png
MyProject/Assets.xcassets/AppIcon.appiconset/Icon-Small.png
MyProject/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png
MyProject/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png
MyProject/Assets.xcassets/Background.imageset/Background.png
MyProject/Assets.xcassets/DummyCompanyLogo.imageset/
MyProject/DropDownList.swift
MyProject/FontCell.swift
MyProject/FontLibraryTab.swift
MyProject/FontList.swift
MyProject/GeneralInfosTab.swift
MyProject/MyProject-Bridging-Header.h
MyProject/ManageDataTab.swift
MyProject/NotificationsChecklist.swift
MyProject/OpeningHoursPopUp.swift
MyProject/ProfileActivityTab.swift
MyProject/ProfileNotificationsTab.swift
MyProject/SecurityTab.swift
MyProject/SettingsController.swift
MyProject/SettingsNotificationsTab.swift
MyProject/SettingsTabsView.swift
MyProject/TabsView.swift
MyProject/WeekdaysTab.swift
Podfile
Podfile.lock
没有更改添加到提交(使用“git add”和/或“git commit -a”)
请帮忙。
<小时/>
更新1
我试图复制错误,它也发生在我的旧项目中。使用新项目(单独或在旧工作区内),Xcode可以正确报告文件的状态,并且可以提交。
(我现在正试图找出为什么在旧项目中Xcode内部无法进行git-commit ...)
答案 0 :(得分:0)
我没有找到任何解决方案,所以我已经安装了Xcode 7.3.1
所以现在我使用Xcode 8.0进行编码,然后打开Xcode 7.3.1提交并推送到我的Github存储库。它有效。
答案 1 :(得分:0)
我建议使用Terminal
来提交,提取和播放推送你的代码。
要执行以下步骤:
Terminal
cd path_where_your_repository_is_locally
git status
- 检查状态git add -A
- 添加所有已修改或新添加的文件。git commit -m "Your Commit Message"
git pull origin Branch
- 获取您不具备的代码&amp;是由其他开发人员承诺的。git push origin Branch
- 推送您的代码&amp;文件到服务器。那就是它。希望这会有所帮助。