Skip to content

Instantly share code, notes, and snippets.

@CraigWilliams
Created April 18, 2010 16:18
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 CraigWilliams/370326 to your computer and use it in GitHub Desktop.
Save CraigWilliams/370326 to your computer and use it in GitHub Desktop.
function ignore_git () {
cat > .gitignore <<DOC
log/*.log
tmp/*
tmp/**/*
doc/api
doc/app
db/*.sqlite3
*.swp
*~
.DS_Store
DOC
}
function git_init () {
# Only create the .gitignore file for rails apps
if [ "$1" == "rails" ] ; then
ignore_git
echo ""
echo "Created .gitignore file"
echo ""
fi
# Initialize the git repo
git init && git add . && git commit -m "Initial commit"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment