[英]I've updated Git and 'lost my Head', so now I can't commit
我最近下載了 git 2.19.0.windows.1。 在以前的 git 版本中,我可以 git clone 和 git commit 從/到我的本地驅動器和我的 H 驅動器。 現在使用這個版本的 git,我只能在本地驅動器上執行 git clone 和 commit,而不能在我的 H 驅動器上執行。 當我在 H 驅動器上提交時,出現以下錯誤:
fatal: cannot update the ref 'HEAD': unable to append to '.git/logs/HEAD': Bad file descriptor
我試圖使用以下代碼找到我的頭:
$ echo ref: refs/head/master >.git/HEAD
這行不通,我不知道下一步是什么。
我最近遇到了同樣的問題。 我現在不確定根本原因,但我刪除了.git/logs/HEAD
文件夾,然后提交就順利完成了。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.