Solved: Renaming failed “git mv: Permission denied”

This post will show you how to fix this git renaming failed: Permission denied error when you are trying to run the git mv command.

Basically, you may hit this error when trying to rename a folder on case sensitive. For example, rename folder “example” to “EXAMPLE”.

git mv example EXAMPLE
fatal: renaming 'example' failed: Permission denied

This error is still not disappeared although you have closed programs that may be working on this folder.

To solve the issue in a simple way, you can do the following two steps:

  1. Rename “example” to “tmp”
  2. Rename “tmp” to “EXAMPLE”

Here is the command how to do this:

git mv example tmp
git mv tmp EXAMPLE

That’s all!

guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Ivan Hg
Ivan Hg
1 year ago

it works for me, thanks so much

1
0
Would love your thoughts, please comment.x
()
x