I've been reading on Stack Overflow about using gitignore to ignore everything except specific files. I've tried a bunch of different suggestions, but I can't get it to work for me.
Here's what I'm trying to do: I want to exclude everything except one file in my main directory and a couple other files in the subdirectory. So, I want only these files:
flightsofideas.rb
/FlightsOfIdeas/svgExportTools.rb
/FlightsOfIdeas/svgExport.rb
My latest version of gitignore is:
*
!flightsofideas.rb
!/FlightsOfIdeas/svgExportTools.rb
!/FlightsOfIdeas/svgExport.rb
But git only includes flightsofideas.rb
, it doesn't get the files in the subdirectory.