When I run git status, it shows the below error
warning: unable to access '/etc/gitconfig': Is a directory
warning: unable to access '/etc/gitconfig': Is a directory
warning: unable to access '/etc/gitconfig': Is a directory
The solution is to remove /etc/gitconfig. The target /etc/gitconfig might be varied from each case. With the below command, all can be solved.
sudo rmdir /etc/gitconfig
The reason that the problem suddenly pops up is because I ran a experiment docker command something like docker run --rm -v /etc/gitconfig:/etc/gitconfig ..... So the /etc/gitconfig is created.
Enjoyed this article? Support my work with a coffee ☕ on Ko-fi.