Last week I created a git repo for a project. This morning, I tried git status
which results in fatal: detected dubious ownership in repository at 'C:/ProjectPath/ProjectName'
.
I believe I created the git repository using an administrator command prompt, so I tried git status
in an administrator command prompt and it works. The same results happen when I use the Git Bash: it works when run as an administrator.
How can I change the repo's ownership to allow non-administrative usage? This SO question suggests multiple solutions using sudo; however, these are not applicable to git for windows: sudo echo test
returns bash: sudo: command not found
.