Archive

Archive for the ‘Uncategorized’ Category

One-liner in Ruby to add empty .gitignore to empty directories

April 20th, 2011 No comments

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 Tags: