How to resolve Git error: "fatal: BUG: get_tempfile_fd() called for inactive object"

The resolution for me was was deleting .git/index.lock.


The problem for me was that I didn't have permissions for the directory I was in, so switching to the correct user fixed it for me. Simple fix but you can easily overlook it.


This is often a permissions error. On Linux you can chown the folder or switch to the appropriate user.

Use ls -la within the parent folder to see the user permissions. If this is indeed the problem, you can chown the folder recursively.

If my folder name containing the repository was happytimes and my name was daniel I would do:

sudo chown -R daniel:daniel happytimes

Tags:

Git