Skip to content

Instantly share code, notes, and snippets.

@func09
Created February 19, 2010 11:40
Show Gist options
  • Save func09/308647 to your computer and use it in GitHub Desktop.
Save func09/308647 to your computer and use it in GitHub Desktop.
# Copy database.yml
run "cp config/database.yml config/database.yml.sample"
# Delete unnecessary files
run "rm README"
run "rm public/index.html"
# Add .gitignore
run "touch tmp/.gitignore log/.gitignore vendor/.gitignore"
run %{find . -type d -empty | grep -v "vendor" | grep -v ".git" | grep -v "tmp" | xargs -I xxx touch xxx/.gitignore}
file '.gitignore', <<-END
.DS_Store
log/*.log
tmp/**/*
config/database.yml
db/*.sqlite3
db/schema.rb
END
# Commit git
git :init
git :add => "."
git :commit => "-a -m 'First commit.'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment