I want to run git add -p
on a file with a full path that includes parentheses, like so:
git add -p "(External)/Project/Filename.cs"
However, when I run this, I get the following error:
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `git ls-files -- (External)/Project/Filename.cs'
I have also tried escaping the parentheses using \
, but I get the same error. For comparison, a regular git add
has no issues with the parentheses.
How can I pass in this file to git add -p
?
EDIT: It seems relevant that I'm using Windows.