Robert Dailey <rcdailey.lists@xxxxxxxxx> writes: > If I run the command: > > git add -p -- ':^*.cs' > > I get an error: > > fatal: empty string is not a valid pathspec. please use . instead if > you meant to match all paths > Cannot close git diff-index --cached --numstat --summary HEAD -- > :(exclude,prefix:0)*.cs () at C:/Program > Files/Git/mingw64/libexec/git-core\git-add--interactive line 242. > > However, it works if I remove `-p`. Also observed this works too: > > git add -p -- ':*.cs' > > So it looks like we have a corner case where I can't do a patch add > while excluding files. Is this intentional? I do not think so. Does this command git add -p -- . ':^*.cs' work as you expect?