这是我的情况:
但是在打字git checkout master命令后突然我的电脑遇到蓝屏死机并且发生意外的力量关闭.在重新启动计算机后,我检查了当前分支的状态,结果我将每个文件都标记为新文件.
现在,我陷入了困境,在git log命令之后我得到了错误
$ git log
fatal: your current branch appears to be broken
Run Code Online (Sandbox Code Playgroud)
如何解决这个问题并恢复我的分支?
我正在使用Windows 7和git bash最新版本
编辑:我不想删除此分支.
今天我得到avast的更新后,我再也无法启动任何Android模拟器(Bluestacks 3和NOX).当我尝试启动模拟器后,模拟器的80-90%的引擎加载没有任何反应,然后我得到了引擎无法启动的模拟器的混乱,它给了我2个选项(重新启动引擎或重新启动计算机)两者会让我的系统崩溃,我得到一个错误代码为0x00000667的蓝屏(不知道我是否错过了0).我已经尝试禁用防病毒并重试但得到了同样的问题,我重新安装Android模拟器,但得到了相同的结果.我最糟糕的问题是我的计算机没有激活文件保护以恢复到prewvie点,所以我现在卡住了,我宁愿不重置我的整个计算机.有什么建议我该怎么办?我真的遇到了麻烦,我希望这是一个正确的问题.
以下 C++ 代码会导致蓝屏。
#include "stdafx.h"
#include <iostream>
#include <string>
#include <Windows.h>
#pragma comment(lib, "ntdll.lib")
using namespace std;
EXTERN_C NTSTATUS NTAPI RtlAdjustPrivilege(ULONG, BOOLEAN, BOOLEAN, PBOOLEAN);
EXTERN_C NTSTATUS NTAPI NtRaiseHardError(NTSTATUS, ULONG, ULONG, PULONG_PTR, ULONG, PULONG);
int main(int argc, char **argv)
{
BOOLEAN bl;
RtlAdjustPrivilege(19, TRUE, FALSE, &bl);
unsigned long response;
NtRaiseHardError(STATUS_ASSERTION_FAILURE, 0, 0, 0, 6, &response);
return 0;
}
Run Code Online (Sandbox Code Playgroud)
我想为此使用 C#,所以我尝试使用 P/Invoke。但它不起作用。问题出在 NtRaiseHardError 签名上。我还没有在网上找到任何关于它的信息(例如 pinvoke.net 没有显示 NtRaiseHardError 因为它没有记录。)
这是我尝试过的:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using …Run Code Online (Sandbox Code Playgroud) 我刚刚遇到蓝屏,我将上周左右的所有工作都存储在其中,但现在在那次事件之后它就消失了......好吧,我可以.git在资源管理器中看到该文件夹,但这样做git status or fsck表明它不是一个git repo...这是 powershell 上的一个小玩意
PS C:\Users\tyoc\Documentos\wtf> git status
fatal: Not a git repository (or any of the parent directories): .git
PS C:\Users\tyoc\Documentos\wtf> cd .git
PS C:\Users\tyoc\Documentos\wtf\.git> git status
fatal: Not a git repository (or any of the parent directories): .git
PS C:\Users\tyoc\Documentos\wtf\.git> cd ..
PS C:\Users\tyoc\Documentos\wtf> git init
Reinitialized existing Git repository in C:/Users/tyoc/Documentos/wtf/.git/
PS C:\Users\tyoc\Documentos\wtf> git status
fatal: Not a git repository (or any of the parent directories): .git
PS C:\Users\tyoc\Documentos\wtf> git …
git ×2
c# ×1
c++-cli ×1
fatal-error ×1
git-branch ×1
git-log ×1
pinvoke ×1
recovery ×1
windows ×1