bad object refs/remotes/origin/HEAD


How to handle git gc fatal: bad object refs/remotes/origin/HEAD error: failed to run repack

I randomly hit list today while trying to garbage collect.

$ git gc
fatal: bad object refs/remotes/origin/HEAD
error: failed to run repack

How do I deal with this?

 

 
  https://stackoverflow.com/a/38192799/3782855

I don't understand the ramifications分支 of this, but as suggested in this thread, when I encountered this I just did

$ mv .git/refs/remotes/origin/HEAD /tmp

(keeping it around just in case) and then

$ git gc

worked without complaining; I haven't run into any problems.

 

問題原因應該是,添加了新的remote,但是沒有git for windows沒有移除后台的origin?

 

 

 

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM