Git Tag失败,代码为128:致命:.git/packed-refs中未终止的行 [英] Git Tag failed with code 128: fatal: unterminated line in .git/packed-refs

查看:765
本文介绍了Git Tag失败,代码为128:致命:.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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆