Help Center/ CodeArts Repo/ FAQs/ Troubleshooting/ Message "pathspec XXX did not match any files" Is Displayed
Updated on 2023-09-06 GMT+08:00

Message "pathspec XXX did not match any files" Is Displayed

Symptom

When a user runs git add, the message pathspec XXX did not match any files is displayed.

Analysis

There is no README.md file on the local computer. The git add command is used to add an existing file to the stage. It cannot create a file.

Solution

Method 1: Manually create the README.md file in the local repository and run git add.

Method 2: Run touch README.md to create the README.md file, and run git add.