When I receive this error, the fix is to:
rm -rf .git
Then, I can git init
again, with a clean initialization, and it works...
Another solution that I found for this is:
- open
.git/config
file - clear all the NULL values in the file
- save and close the file
git add .
#dsmith73 |
---|
Are you trying to use git with PowerShell or with Linux on WSL?
My setup is:
Win11 > WSL > Ununtu
Then I installed VS Code and finished setting everything up through Terminal.
So, for me, git is installed on Ubuntu, in WSL, not with PowerShell