Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Allow node.exe and ignore all other .exe

Tags:

git

gitignore

I want to not igore the file node.exe

but ignore all other .exe files, how can I achieve this?

My code is not working:

# Compiled source #
###################
/build/*
!node.exe
*.exe

*.o
*.so
*.com
*.pdb
*.ini
like image 364
Haroon Avatar asked Dec 15 '22 21:12

Haroon


1 Answers

Reverse the order from:

!node.exe
*.exe

to:

*.exe
!node.exe

The last statement "overwrites" the previous.

like image 183
stewe Avatar answered Jan 05 '23 15:01

stewe