Does git support wildcards in paths?

Git does support some pathspec globbing, but you need to be careful to shell-escape the characters so they aren’t interpreted by in your case, msys bash, which doesn’t support more sophisticated wildcard expansion.

EDIT: Also, for your reset example, you can just pass the directory as an argument to git reset and git will operate recursively.

git reset my/long/path

rather than

git reset my/long/path/*

Leave a Comment