unable to write symref for HEAD: Permission denied unable to update HEAD

Viewed 2434

Git checkout to new branch gives below error

unable to write symref for HEAD: Permission denied unable to update HEAD

But it works if I delete the repo and create a new one. The moment I restart my laptop I guess it stops working.

The problem is in Windows 10.

1 Answers

This happened to me when I had git and 2 Visual studio instances open with the same solution. Git checkout gave the same error and showed some changes as staged for commit when they shouldn't have been. I've reverted those changes, closed one of the Visual Studios and tried checkout again, it worked nicely.

Related