Windows 的 github 每天崩溃几次

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12780095/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 15:55:46  来源:igfitidea点击:

github for windows crashing several times a day

windowsgithubcrashgithub-for-windows

提问by Mahdi

I newly started working on Githubvia their native Windows Application, it's quite good however it's crashing so often and the horrible thing is that I lose all the recent changes after it's crashing. All the local files will rollback to the last version of the successful commit or sync.

我刚开始Github通过他们的原生 Windows 应用程序工作,它非常好,但是它经常崩溃,可怕的是我在崩溃后丢失了所有最近的更改。所有本地文件将回滚到成功提交或同步的最后一个版本。

I'm on a 64bit windows 8 machine. Any ideas?

我在 64 位 Windows 8 机器上。有任何想法吗?

The exact error after crash is Couldn't find a HEAD in this repository

崩溃后的确切错误是 Couldn't find a HEAD in this repository

回答by David

I sent an email to GitHub For Windows support. Their answer was this:

我向 GitHub 发送了一封电子邮件以获得 Windows 支持。他们的回答是这样的:

Hi David,

I am sorry for the trouble.

I have been able to reproduce this problem, and have filed a report for our developers to look at. The reason the application is crashing is likely due to merge conflicts between the local and remote repositories.

The easiest way to resolve this would be to go into the repository that is saying 'failed looking for HEAD', closing that pop-up, and clicking Tools -> Open a Shell Here.

  • From the shell, you can run 'git reset --merge' to undo the merge that caused GitHub for Windows to crash.
  • From there, run 'git checkout master' to switch from the detached HEAD.
  • After that, run 'git pull' in the shell to pull down any new changes. It will prompt you to fix any merge conflicts (which is what caused the app to crash).

Once you fix the merge conflicts in the files, you should then be able to sync correctly in GitHub for WIndows.

I have been testing this issue, and after I resolved the conflicts with the initial crash, I no longer had any further trouble with GitHub for Windows. It correctly prompted me to open the shell and resolve merge conflicts rather than crashing.

Let me know if you have any further questions, and hopefully we will have a fix out for this soon.

Best, Steve

嗨,大卫,

我很抱歉给您带来麻烦。

我已经能够重现这个问题,并且已经提交了一份报告供我们的开发人员查看。应用程序崩溃的原因可能是本地和远程存储库之间的合并冲突。

解决此问题的最简单方法是进入显示“ failed looking for HEAD”的存储库,关闭该弹出窗口,然后单击Tools -> Open a Shell Here

  • 在 shell 中,您可以运行“ git reset --merge”来撤消导致 GitHub for Windows 崩溃的合并。
  • 从那里,运行“ git checkout master”以从分离的HEAD.
  • 之后,git pull在 shell 中运行 ' ' 以下拉任何新的更改。它会提示您修复任何合并冲突(这是导致应用程序崩溃的原因)。

修复文件中的合并冲突后,您应该能够在 GitHub for WIndows 中正确同步。

我一直在测试这个问题,在解决了与初始崩溃的冲突后,我在 GitHub for Windows 上不再有任何进一步的问题。它正确地提示我打开外壳并解决合并冲突而不是崩溃。

如果您有任何其他问题,请告诉我,希望我们能尽快解决此问题。

最好的,史蒂夫

回答by Mahdi

This is the solution I received from Github support. I'll copy & paste the exact text here:

这是我从 Github 支持收到的解决方案。我将在此处复制并粘贴确切的文本:

The easiest way to resolve this would be to go into the repository that is saying 'failed looking for HEAD', closing that pop-up, and clicking Tools -> Open a Shell Here. From the shell, you can run 'git reset --merge' to undo the merge that caused GitHub for Windows to crash. After that, run 'git pull' in the shell to pull down any changes. It will prompt you to fix any merge conflicts. Once you fix the merge conflicts in the files, you should then be able to sync correctly in GitHub for WIndows.

I have been testing this issue, and after I resolved the conflicts with the initial crash, I no longer had any further trouble with GitHub for Windows. It correctly prompted me to open the shell and resolve merge conflicts rather than crashing.

解决此问题的最简单方法是进入显示“查找 HEAD 失败”的存储库,关闭该弹出窗口,然后单击工具 -> 在此处打开外壳。在 shell 中,您可以运行“git reset --merge”来撤消导致 GitHub for Windows 崩溃的合并。之后,在 shell 中运行 'git pull' 以拉下任何更改。它会提示您修复任何合并冲突。修复文件中的合并冲突后,您应该能够在 GitHub for WIndows 中正确同步。

我一直在测试这个问题,在解决了与初始崩溃的冲突后,我在 GitHub for Windows 上不再有任何进一步的问题。它正确地提示我打开外壳并解决合并冲突而不是崩溃。

回答by Nick Josevski

I had this problem after I made an unstable change to my .gitconfig user file.

在对我的 .gitconfig 用户文件进行了不稳定的更改后,我遇到了这个问题。

I only detected the issue after I tried using TortoiseGIT and it outlined the error parsting the config file with an unexpected token.

我在尝试使用 TortoiseGIT 后才检测到这个问题,它概述了使用意外令牌解析配置文件的错误。

So the fix was to correct the bad .gitconfig file.

所以修复是纠正错误的 .gitconfig 文件。