One-liner in Ruby to add empty .gitignore to empty directories
ruby -e 'require "fileutils" ; Dir.glob(["**","**/**"]).each { |f| FileUtils.touch(File.join(f, ".gitignore")) if File.directory?(f) }'
I suggest you stick this in a Rakefile for your project.
Categories: Uncategorized
