Created
April 18, 2010 16:18
-
-
Save CraigWilliams/370326 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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