Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Small fix to the default rails .gitignore #164

wants to merge 1 commit into


None yet
3 participants

telemachus commented Jan 14, 2011

rails new produces a .gitignore file that uses Ruby-style globbing that git doesn't recognize (tmp/**/*). As a result, something like tmp/foo.rb would not be ignored.

A simple tmp/ should ignore the tmp directory - whatever it contains in terms of files or sub-directories..


samuelkadolph commented Jan 14, 2011

Isn't just tmp good enough? We should be consistent between .bundle and tmp/.


mikel commented Jan 29, 2011

tmp would ignore any file that is called tmp. tmp/ is correct.

Pulled and pushed, thanks for the fix.


samuelkadolph commented Jan 31, 2011

For the record, gitignore passes in any ignore line with an * that also has a / to the system's fnmatch. So while gitignore doesn't say it recognizes tmp/**/* it does get passed to the system which most likely does recognize it.

From man gitignore


telemachus commented Jan 31, 2011

Yup, I put that imprecisely: git recognizes the phrase tmp/**/*, but it interprets that syntax differently from Ruby. A file tmp/foo.rb would not be ignored by git using the old gitignore file, and I thought that was a mistake. (That is, I'm still assuming that whoever wrote the original gitignore file wanted to ignore the tmp directory and anything in it, to whatever depth.)

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment