could not open git/commit_editmsg

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 this error message:
“could not open ‘.git/COMMIT_EDITMSG’: Permission denied.

Any ideas?

  • git push non for all the commits
  • How can I prevent Subversion commits without comments?
  • When creating a new git repository with 40,000 things, so I have to uncomment each in the COMMIT file?
  • Git: does ffwd merge preserves all topic branch commits?
  • Can git list the tags that occur between two particular commits?
  • How to make a git rebase and keep the commit timestamp?
  • Thanks,

  • Git- how to checkout a specific version (commit hash) in Teamcity?
  • Git log between tags
  • What is best practice for keeping secrets out of a git repository?
  • cloning error when checking out private github repo
  • Git error: object xxxx: hasDot: contains '.'
  • create 'bare' git repo without cloning it
  • 4 Solutions collect form web for “could not open git/commit_editmsg”

    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

    Git Baby is a git and github fan, let's start git clone.