I have 2 files locally: File 1.txt and File 2.txt.
When I stage the files with the command git add File 2.txt
, it is giving me the below error:
fatal: pathspec 'File' did not match any files
I solved myself by referring the article in Noble desktop Blog.
The answer is:
If the file name/path has a space, wrap it in quotes(Single/double).
Command:
git add 'File 2.txt'