El Capitan 上锁定的 Git 存储库

标签 git icloud xcode7 osx-elcapitan

几天前在我的 Mac 上安装 El Capitan 后,我无法提交到当前项目的存储库。我正在使用 Xcode 7(官方版本)并不断收到此错误:工作副本“我的应用程序”无法提交文件。存储库已锁定。 我不习惯使用 git,因此如果有人能告诉我如何解决此问题(如何解锁它或者如果错误消息实际上是其他该怎么办),我会很高兴误导)。当尝试使用 Github Desktop 提交时,我不断收到错误 无法写入索引。

顺便说一句:我将我的项目移至云端(iCloud Drive)——这会是一个问题吗?编译实际上是有效的,但是当我尝试直接从云端编译 .tex 文件时遇到了一些困难...

最佳答案

通过 rm 或其他一些系统命令删除 .git 文件夹中存在的锁定文件。然后,在您的存储库上运行 git reset(执行此操作时,请确保您不在 .git 文件夹中)。

关于El Capitan 上锁定的 Git 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32958626/

相关文章:

git - 如何检查 git branch 是否有跟踪分支?

iOS:当我从前台切换到后台时,我丢失了核心数据实体

iphone - 核心数据 'This NSPersistentStoreCoordinator has no persistent stores. It cannot perform a save operation.'

ios - 书 "Beginning iOS 9 Programming with Swift"中的堆栈 View 示例

iOS 9 pushViewController 不工作,在 iOS 8 中一切都按预期工作,零代码更改?

git - 使用裸存储库 Hook 将服务器恢复到过去的提交

git - cpanel 警告 : Your system administrator must enable shell access to allow you to view clone URLS

git - 错误: failed to push some refs to 'https://github. com/

ios - 如何在使用 UIDocumentPickerViewController 选择文档并下载到设备之前在 iCloud 中查找文档的大小

ios - 注销后如何重新加载 Root View Controller ?