Reputation: 11
I am trying to update my file, but I was unable to do so because of file name contains two words
$ git add 00162808_LirajMaharjan_CP_Design/Class diagram.mdj
Error:
fatal: pathspec '00162808_LirajMaharjan_CP_Design/Class' did not match any files
Can I add a file like 'Class diagram/mdj' with spaces in the name?
Upvotes: 0
Views: 7152
Reputation: 34732
Either escape the space with a backslash:
git add 00162808_LirajMaharjan_CP_Design/Class\ diagram.mdj
Or quote the filename:
git add "00162808_LirajMaharjan_CP_Design/Class diagram.mdj"
Single quotes work too:
git add '00162808_LirajMaharjan_CP_Design/Class diagram.mdj'
Upvotes: 7