could not open git/commit_editmsg

前端 未结 6 1743
自闭症患者
自闭症患者 2021-01-12 17:43

I have a git repository linked to a dropbox folder. Recently, I have switched my laptop to another, and now i can not perform the function \"git commit -am\". I keep getting

6条回答
  •  执笔经年
    2021-01-12 18:14

    I had same issue, here the steps , how I solved the issue.

    1) first checked the file permission( and found, only root having access )

    $ls -l .git/COMMIT_EDITMSG

    -rw-r--r-- 1 root root 13 Jun 11 07:54 .git/COMMIT_EDITMSG

    2) logged in as root and changed file permission

    # chown arun:arun .git/COMMIT_EDITMSG ( here arun is my username, refer chown command for more details )

    3) Now file permission changed and able to commit without any issues !

    $ls -l .git/COMMIT_EDITMSG

    -rw-r--r-- 1 arun arun 12 Jun 16 11:47 .git/COMMIT_EDITMSG

提交回复
热议问题