I've set up a demo problematic repository on github: https://github.com/asottile-archive/git-windows-branch-test The minimal reproduction is: rm -rf x git init x cd x git remote add origin https://github.com/asottile-archive/git-windows-branch-te> git fetch origin --tags Here's the output: + git init x Initialized empty Git repository in C:/Users/IEUser/x/x/.git/ + cd x + git remote add origin https://github.com/asottile-archive/git-windows-branch-test + git fetch origin --tags remote: Enumerating objects: 10, done. remote: Counting objects: 100% (10/10), done. remote: Compressing objects: 100% (4/4), done. remote: Total 10 (delta 0), reused 0 (delta 0), pack-reused 0 Unpacking objects: 100% (10/10), done. >From https://github.com/asottile-archive/git-windows-branch-test * [new branch] master -> origin/master error: cannot lock ref 'refs/remotes/origin/pr/aux': Unable to create 'C:/Users/IEUser/x/x/.git/refs/remotes/origin/pr/aux.lock': No such file or directory ! [new branch] pr/aux -> origin/pr/aux (unable to update local ref) real-world issue: https://github.com/pre-commit/pre-commit/issues/1058 Thanks Anthony