Recently, as I was making a React app, I encountered this problem. I tried using the commands suggested to resolve it, but in vain. However, I came to a solution that worked for me. Here is the solution step-by-step.
**1. Go to your text editor's menu, choose the files option, and then select the preference option.
Once you're there, select click settings.
On the left, click Text Editor and move to the files option.
Scroll down to where it says 'Exclude' then delete the .git file. Now you're able to see the git files.
Delete the two git files.
Now you're good to go, initialize git again and start the git processes again.**
This worked on the vscode editor. You might also need to delete the previously created GitHub repo.
Top comments (0)