Got the below error message for a simple git status
. I pretty much know the reason, last week in my Windows 11 encountered “blue screen of death”, due to which i had to reinstall Windows and in the process i had changed system username.
You just have to change the ownership of all folders
-
Go to the parent folder
-
Right-click, Properties
-
Select “Security” tab
-
Click Advanced
-
Click Change
-
Enter the current System username and Click Check Names
-
If you don’t know the current username. In the command prompt enter
echo %USERNAME%
-
Click Checkbox then Apply
Now, click OK and close the properties. Open the Properties ⇒ Security ⇒ Advanced
- Now you can see the Owner name has changed
Now go back to Git and Retry