Skip to content

Instantly share code, notes, and snippets.

@luisbebop
Created April 15, 2010 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luisbebop/367274 to your computer and use it in GitHub Desktop.
Save luisbebop/367274 to your computer and use it in GitHub Desktop.
# Use this commands inside app folder
git init
git status
git add .
git commit -a
touch tmp/.gitignore log/.gitignore vendor/.gitignore
# Create this .gitignore file
.DS_Store
log/*.log
tmp/**/*
config/database.yml
db/*.sqlite3
# or ...
# I use the following little "git-rails" script to take a new Rails project and initialise it as a git repository.
#!/bin/sh
git init
cat <<EOF > .gitignore
.DS_Store
log/*.log
tmp/**/*
db/*.sqlite3
coverage
doc/app/*
EOF
find . -type d -empty -exec touch {}/.gitignore \;
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