Reason: The .git file is not included in the subdirectory level of the opened file.
Solution:
- The file level is wrong, nesting contains subfolders. You need to find the upper level directory that contains the .git file to operate.
- You can try the operation again after git init.