1

Does anyone know why this error could be coming on git gc? Seems like related to a branch i had made by mistake.

$ git gc                                                                                                                                                                                            
error: bad ref for __init__.py
fatal: bad object refs/__init__.py
error: failed to run repack$ git gc                                                                                                                                                                                             

1 Answer 1

2

It would appear that you've created a file named .git/refs/__init__.py, i.e., you put a file into git's repository, but it's not in a form git can use. You should move that file out of there (or remove it entirely).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.