shiningthrough

Ignoring Ruby On Rails files with Git, on OS X, and using TextMate

03 April 2010

I thought I would share which files I ignore with Git, while developing Ruby On Rails applications using TextMate on Mac OS X.

There are 2 ways to ignore files using Git:

my .gitignore file
log/*.log
tmp/**/*
config/*.yml
db/*.sqlite3
mkmf.log

These are all fairly self explanatory, mkmf.log is a file created by Capistrano after a deployment.

My .git/info/exclude file
# git-ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
.DS_Store
._*
*.tmproj

.DS_Store and ._* files are created by Mac OS X, and *.tmproj files are created by TextMate, my editor of choice, therefore these files are unique to my setup and belong in the .git/info/exclude file.

If anyone else has any suggestions, leave a comment, and i'll adjust the above examples accordingly.

Comments

Edgar

Thanks, ill be doing the same as you.

Dany

Got it! Thnkas a lot again for helping me out!