MadLittleMods
10/5/2016 - 5:03 AM

git-merge-permission-denied-windows.md

Often when I try to merge a branch with Git on Windows, I get Permission denied errors. I am not sure what is the cause but cleaning up and trying to the merge again works.

Steps

> git merge develop
error: unable to create file public/less/bootstrap/dropdowns.less (Permission denied)

This will leave a bunch of files in your unstaged area :-1:

Run the following Git commands to reset back before the merge to get rid of the files in the staging area

> git reset --hard origin/feature/something
> git clean -fd

Now the merge will work :confused:

> git merge develop