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 |
---|
2 items
My suggestion here is that you probably had issues with the install and need to review the installation instructions / re-install git.
If you're going to use git on Windows, then I really suggest creating a folder structure and putting everything in it, so that you have clear path to your code spaces.
For instance, when I did use git on Windows, I made a folder called
code
, installed inside it, and did everything from within it.Guessing this isn't the answer you hoped for...