Git Tag失败,代码为128:致命:.git/packed-refs中未终止的行 [英] Git Tag failed with code 128: fatal: unterminated line in .git/packed-refs
问题描述
我在SourceTree中遇到一个错误,指出遇到错误:'git tag'失败,代码为128:致命:.git/packed-refs中的未终止行"如果有人看到了此错误并知道了解决方案,我会感激不尽.
I am having an error in SourceTree that says, "Error Encountered: 'git tag' failed with code 128: fatal: unterminated line in .git/packed-refs" If anyone has seen this error and knows a solution I would be grateful.
推荐答案
只需删除文件 .git/packed-refs
.
然后使用 pull
或 fetch
刷新"您的存储库.
Then "refresh" your repo with a pull
or fetch
.
我遇到了相同的错误
致命:.git/packed-refs中的未终止行:...
(那个文件只是以下几行:
(And that file was just lines of:
0000 0000 0000 0000 0000 0000 0000 0000
)
就我而言,删除文件是可行的,我能够再次使用我的存储库.
In my case deleting the file worked and I was able to use my repo again.
无法通过上述操作,我会尝试在此答案中提及 的内容.这些步骤是:
Failing the above, I would try something like mentioned in this answer. The steps are:
- 移动旧的git目录
- 初始化新仓库
- 链接到旧仓库(通过
远程添加来源
) - 获取旧历史记录(
获取
) - 通过执行
reset
强制更新到旧历史记录
- move old git directory
- initialise new repo
- link to old repo (by
remote add origin
) - get old history (
fetch
) - force update to old history (by doing a
reset
)
这篇关于Git Tag失败,代码为128:致命:.git/packed-refs中未终止的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!