could not open git/commit_editmsg

自古美人都是妖i 提交于 2019-12-01 09:37:56

This is an file permission issue, user you are currently logged on does not have permissions to use the files.

If that's your repo, you may try:

  • switching to other user who owns the repo
  • changing the owner of the repo (sudo chown youruser -R yourrepodir/)
  • changing the permissions for the particular files using chmod (you should avoid using 0777 as it is not secure)

Assuming you're on a Windows machine, the chances are that you modified a hidden file and no longer have write permissions to the hidden file.

To solve this, simply navigate to your .git folder and delete the "COMMIT_EDITMSG" file.

try this git init --shared=0777

I had this issue when I had a git repo inside a git repo in a working copy.. hope that helps

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!