#StackBounty: #git #read-only-mode Cannot edit ".gitignore" due to strange errors and read-only switched on

Bounty: 50

A new error has occurred with a recent upgrade to Emacs 27.1. I’m trying to edit .gitignore and get the following error:

*ERROR*: Unlocking file: Invalid argument, <directory>/.gitignore

To check this is not an error in an initialisation file, I tried with emacs -q .gitignore. However, in this case the file is set to read-only and cannot be edited, and the strange error

File exists, but cannot be read

appears, then the file appears but as read-only. It doesn’t seem to be possible to change to non-read only. To surmount this problem I have taken to renaming .gitignore to another file name then moving that using the mv command. The file itself is not read-only:

$ ls -l .gitignore
-rw-r--r--  1 ben  ben  843 Sep  4 07:20 .gitignore

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.