Skip to content

Instantly share code, notes, and snippets.

@johnreilly
Created April 11, 2009 19:56
Show Gist options
  • Save johnreilly/93703 to your computer and use it in GitHub Desktop.
Save johnreilly/93703 to your computer and use it in GitHub Desktop.
### Get rid of unneeded files
["./tmp/pids", "./tmp/sessions", "./tmp/sockets", "./tmp/cache"].each do |f|
run("rmdir #{f}")
end
["./README", "./doc/README_FOR_APP", "./public/index.html", "./public/favicon.ico", "./public/images/rails.png", "./public/robots.txt"].each do |f|
run("rm #{f}")
end
### Don't ignore empty directories
run("find . \\( -type d -empty \\) -and \\( -not -regex ./\\.git.* \\) -exec touch {}/.gitignore \\;")
### Create sample db config
run "cp config/database.yml config/database.yml.sample"
### Set up .gitignore file
run "echo \"log/*.log
log/*.pid
db/*.db
db/*.sqlite3
tmp/**/*
.DS_Store
doc/api
doc/app
config/database.yml\" > .gitignore"
### Git 'er up.
git :init
git :add => "."
git :commit => "-a -m 'Initial commit.'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment