I have this file: Default (OSX).sublime-keymap and when I try git add Default (OSX).sublime-keymap I get the following error: sh: syntax error near unexpected token(‘` is there a workaround…or I need to rename the file…
I have this file: Default (OSX).sublime-keymap and when I try git add Default (OSX).sublime-keymap
Share
There are two related problems with your use of the command line, neither of which is specific to Git:
git add, one called “Default” and one called “(OSX).sublime-keymap”.You need to either use quotes around the whole filename, or escape the parentheses and spaces with backslashes:
or
Note that your shell may support tab-completion. Try typing
git add Defand hitting tab a few times, and your shell may auto-complete the filename for you, correctly escaping the spaces and parentheses.