Ruby on Rails Thursday, December 13, 2018

I'm contributing to an open source Rails app.  I submitted a pull request to add .DS_Store to the .gitignore file.  The purpose is to prevent people from accidentally adding the .DS_Store to the source code.  Some people are objecting to this, saying that it's easy to use global gitignore.

While this doesn't directly affect me (since I use Linux instead of MacOS), I've made removing .DS_Store and adding .DS_Store to the .gitignore file to be a standard part of joining a Rails app.  If you use my Rails Neutrino tool (https://www.railsneutrino.com/) or Generic App gem (https://www.genericapp.net/) to start a new Rails app, you start off with .DS_Store already in the .gitignore file.

Global gitignore on MacOS may be easy to use, but I still don't understand the objection to adding .DS_Store to .gitignore.  Can any of you shed some light on why people might NOT want .DS_Store listed in .gitignore?  Is it really that beneficial to keep the .gitignore file as short as possible?  It seems to me that it's better to have .DS_Store in .gitignore than risk facing the annoyance of accidentally committed .DS_Store files later.  Can you really count on everyone to have global gitignore set?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d0bc075d-7dcb-4230-bde8-52ff634bf20b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment