I have just started learing GIT. Follow their tutorial.
Now at the very beginning I got stuck with this error:
Fatal: pathspec \'file.txt\' did not match
I was having the same issue but with the Windows file system. Here was my solution that worked.
from the git project directory. Here is exactly what was displayed with the current directory.
D:\Projects\ReactNative\project>git add "scr/\components/\validate.js"
The file being entered into git was validate.js. It was in a directory under the project. That directory was src\components.