Skip to content

Instantly share code, notes, and snippets.

@dustinchilson
Created December 15, 2010 02:18
Show Gist options
  • Save dustinchilson/741529 to your computer and use it in GitHub Desktop.
Save dustinchilson/741529 to your computer and use it in GitHub Desktop.
#!/bin/sh
rails $1 #Creates the Rails Project
cd $1 #Changes to the Rails Project Directory
git init #Initializes the git repository
#Creates a git ignore file in the Project root directory to hide your log files
#and other development files
cat <<EOF > .gitignore
.DS_Store
log/*.log
tmp/**/*
db/*.sqlite3
coverage
doc/app/*
*.swp
EOF
#Creates git ignore files in empty directories to make them show in the repo
find . -type d -empty -exec touch {}/.gitignore \;
#Adds all of the folders and files to the staging area for git
git add .
#Commits the changes to the repository
git commit -a -m "Initial import."
#Opens your project in Textmate
mate $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment