Message "Not a git repository" Is Displayed
Symptom
The message Not a git repository is displayed after the git add command is executed.
Analysis
The current directory is not the repository directory.
Solution 1
Obtain the path of the repository directory. Run cd repository name to check out the repository and run add again.
Solution 2
Run git init to initialize the current directory as a repository, and then run git add again.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.