【问题标题】:GitHub for Mac crashes on open because of local repository issue由于本地存储库问题,GitHub for Mac 在打开时崩溃
【发布时间】:2015-06-22 13:25:44
【问题描述】:

我试图弄清楚为什么当我选择本地存储库时,我的 Mac 版 GitHub 会在启动时崩溃。我从克隆的文件夹中添加了这个本地存储库。不幸的是,我正在使用 git 命令行,我一定做了一些事情来破坏本地​​存储库。

现在我的 Mac 版 GitHub 正在尝试在重新打开时访问这个损坏的存储库,我无法在程序崩溃之前对其进行更改。我宁愿不清除文件系统,因为我在 GitHub for Mac 中保存了其他存储库。

究竟如何才能解决此问题或删除对导致我出现大量问题的本地存储库的引用?我试图从 GitHub 的人那里得到答案,但他们还没有回复我。谢谢你。我得到的错误如下。

*** Terminating app due to uncaught exception 
NSInternalInconsistencyException', reason: 'Received error from <RACDynamicSignal: 0x600000e3dca0> name:  in binding for key path` "headerContentViewModel" on <GHChangesViewModel: 0x600000129420>: 
NSError { domain: GTGitErrorDomain, code: -12, description: "Failed to create reference to tracking branch from <GTBranch: 0x600000e20c00> name: refs/heads/master, shortName: master, sha:   
b5db93cacaf51cde5ad27c605c4bdb114cd23605, remoteName: (null), repository: <GTRepository: 0x60000041b4e0> fileURL: file:///Users/name/Desktop/personalWebsite/", underlying error: NSError { domain: 
GTGitErrorDomain, code: -12, description: "'https://github.com/name/git.git' is not a valid remote name." } }'
terminating with uncaught exception of type NSExceptionabort() called

【问题讨论】:

标签: macos git github


【解决方案1】:

我遇到了同样的问题,结果证明我的 .git/config 文件中的源代码行不正确。

主分支有以下几行:

[分支“主”] 远程 = git@github.com:/.git

与 [remote "origin"] 行的大部分 url 值匹配。

改成这样:

remote = origin

立即修复了问题,不再像我已经有一段时间的“无法创建跟踪分支”错误了。

请务必复制该行以防它不起作用。

GitHub 支持证实这是正确的解决方案 - 至少在我的情况下。

【讨论】:

  • 谢谢!更改:remote = [repo_github_url] 到 remote = origin 为我解决了这个问题!
【解决方案2】:

您似乎更改了配置文件,特别是针对 repo 位置。如果您无法自己修复 git 配置文件,您可以为我们做cat ./.git/config 吗?

【讨论】:

  • 谢谢。我只是不知道去哪里找。我在 GitHub 中查找 Mac 文件,而不是该存储库的配置文件。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-02-14
  • 1970-01-01
  • 2012-03-12
  • 2023-03-27
  • 2015-04-05
  • 1970-01-01
相关资源
最近更新 更多