Git Tag failed with code 128: fatal: unterminated line in .git/packed-refs

≡放荡痞女 提交于 2021-01-18 05:35:34

问题


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.


回答1:


Just delete the file .git/packed-refs.

Then "refresh" your repo with a pull or fetch.

I had the same error fatal: unterminated line in .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:

  • 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)



回答2:


Just delete the file .git / packed-refs. from the flutter folder

Download the sdk again from https://flutter.dev/docs/get-started/install/windows and copy the folder to the flutter location, in this way files were mixed and everything worked correctly.




回答3:


if did't see .git/packed-refs folder from flutter just delete flutter SDK and extract new SDK same folder



来源:https://stackoverflow.com/questions/54041211/git-tag-failed-with-code-128-fatal-unterminated-line-in-git-packed-refs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!