How can i exclude everything but only specific directory to publish git by using .gitignore
For example my root tree
-node_modules
-js
-ts
-releases
-package.json
I want to only add releases folder and all contents to my git branch.
What I tried
*
!releases
*
!releases/