Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git BUG:unpack trees.c:699:pos必须指向此目录中的第一个条目_Git_Github_Git Reset - Fatal编程技术网

Git BUG:unpack trees.c:699:pos必须指向此目录中的第一个条目

Git BUG:unpack trees.c:699:pos必须指向此目录中的第一个条目,git,github,git-reset,Git,Github,Git Reset,我试图软重置我的分支,以删除我意外推送到GitHub的目录。在软重置之后,我仍然收到以下错误: fatal: Unable to create '/Users/mprestemon/vagrant-local/www/national-fuel/public_html/wp-content/.git/index.lock': File exists. Another git process seems to be running in this repository, e.g. an edit

我试图软重置我的分支,以删除我意外推送到GitHub的目录。在软重置之后,我仍然收到以下错误:

fatal: Unable to create '/Users/mprestemon/vagrant-local/www/national-fuel/public_html/wp-content/.git/index.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
我看到另一篇StackOverflow文章,上面说用以下命令删除.git/index.lock:

rm -f ./.git/index.lock
当我运行该命令并尝试签出或从另一个分支提取时,我现在遇到以下错误:

BUG: unpack-trees.c:699: pos must point at the first entry in this directory

我不知道如何清理我的存储库并确保所有git进程都已完成/中止。有什么建议吗?

我不小心把所有源文件都放在源代码树中删除了,后来又遇到了同样的错误

我无法重置或签出,但最终能够通过

git还原。

之后可以再次正常使用git


也许这会有所帮助……

我最终在本地删除了所有内容,并再次克隆了回购协议。这似乎奏效了

Git列表可能对您遇到这个bug感兴趣,并且可能会提供一些提示。