小编Meg*_*mon的帖子

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

我尝试软重置我的分支以删除我不小心推送到 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.
Run Code Online (Sandbox Code Playgroud)

我发现另一篇 StackOverflow 文章说要使用以下命令删除 .git/index.lock:

rm -f ./.git/index.lock
Run Code Online (Sandbox Code Playgroud)

当我运行该命令并尝试从另一个分支签出或拉取时,我现在得到这个 BUG:

BUG: unpack-trees.c:699: pos must point at the first entry in this directory
Run Code Online (Sandbox Code Playgroud)

我不知道如何清理我的存储库并确保所有 git …

git github git-reset

7
推荐指数
2
解决办法
2454
查看次数

标签 统计

git ×1

git-reset ×1

github ×1