Help Center/ CodeArts Repo/ FAQs/ Troubleshooting/ Message "Not a git repository" Is Displayed
Updated on 2023-09-06 GMT+08:00

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.