Suppose I want to use git add
(or some other command line directive - I cannot use .gitignore) to add all files EXCEPT for a *.hi file. Is there a way to do this? So far I have tried:
git add '!*.hi'
git add '!(*.hi)'
As I understand it, this is how you specify a negation in glob syntax, and it's also how you do it in .gitignore. Yet for both these commands, I receive the error fatal: [pattern] did not match any files
. For what it's worth, I'm running these commands from Windows Powershell.