6 ms·
I'm going to be honest: it should be deleted when seen, and OSX should have never begun this. 99% of the reason it exists is because the OS generated thumbnail
by DiabloD3 6y ago
I'm going to be honest: it should be deleted when seen, and OSX should have never begun this.
99% of the reason it exists is because the OS generated thumbnails. I see these in, for example, zips, that do not have images in them, and have that file.
You know what I've seen? People do `git add ` and then I find that directory in the repo. Why does git not automatically ignore that?! It's never the right option.
Anything* that pollutes directories should be absolutely verboten, its never what the user wants.
Edit: The worst part is, it makes them on network shares, and on filesystems that aren't HFS. The hell, Apple?!
- nyanpasu64 6y ago> Why does git not automatically ignore that?! Why doesn't Git automatically ignore desktop.ini? .desktop? __pycache__? In my experience, people end up creating bespoke .gitignore files for each project and sometimes shared online, or systemwide. I don't know if Git should make it global.
- skyzyx 6y agoJust add it to `~/.gitignore` and be done with it. Yeah haven’t worried about this in 10 years.
- manquer 6y agoThat approach works for one person or like minded dev teams perhaps. it fails in many teams, they do not care or a junior dev does not know. Many folks don't setup proper dotenv especially designers. Unless added to the project .gitignore file it is going to be added to the project sooner or later.
- hnarayanan 6y agoIt is easy to explain and help someone with this. :)
- manquer 6y agoIs it just me or nobody actually have problems working with non technical folks on git ? Getting a team of designers, content writers, marketing folks to use anything beyond their daily tools over a period of time is hard. I had the marketing team run a git managed, asset pipeline ,CI deployed Hugo static site via a CDN for three years, with great performance and high availability for three years, now we run hubspot. Once the initial team moved on, It was next to impossible to hire people willing to work on that stack , typically new guys will know Wordpress or hubspot etc, my TAs had frustrating time sourcing, I finally had to give up . Administrative Config in yaml/JSON files in a git repo sounded a nice idea , git gave version history rollback, audit log, branch/env, CI driven deployment all sounded great. Same problem typical operation folks are not used to this , they want a nice UI , and keep clicking and rather than do a grep/Sed replace in a jiffy. People just like different ways of working , it is hard for me to think graphically like a designer , I can understand that it can be hard for someone to think in text , it is better we give them tools that are comfortable with and fight other battles
- dragonwriter 6y ago> it fails in many teams, they do not care or a junior dev does not know If your team doesn’t care, by definition they don’t see it as a problem, so it only doesn’t work in the sense that they have decided hat they don’t need a solution. If your team cares but your junior devs don't know, you need to work on your standard practices documentation and onboarding procedures. “Use this default baseline .gitignore" is not a very arduous level of standardization that is hard to instill in new juniors.
- raverbashing 6y agoOr even better, XCode, Brew, and other services that have git can set it globally when git is installed. They know about MacOS after all
- bbx 6y agoGenius. Never thought about doing this.
- nyanpasu64 6y agoAdding to `~/.gitignore` is not enough. You need to tell Git to use it via `git config --global core.excludesfile ~/.gitignore` or similar.
- URSpider94 6y agoIf Git started not committing some files in a directory without user input, based on conventions of an OS or programming language that you might not be using, that would seem like quite the ad-hoc side-effect. I would definitely vote for a way to incorporate sane .gitignore settings per-OS or per-language, but still make it opt-in.
- HeWhoLurksLate 6y agoIs it not normal to have a repo or something somewhere just for your starting "boilerplate"? Whenever I switch computers, one of the very first things I do is copy over my bindings in CAD so that I don't have to relearn / figure them out again. I don't see why it'd be so hard to just store your own somewhere, and use it over and over again.
- nyanpasu64 6y ago- I used to setup zsh Git aliases based on zprezto but with some of my own tacked onto it. But you can't install zprezto on Windows Git (which uses bash, not zsh). And I switched to fish on Linux, so I lost my aliases there too. - Different programming languages have different files to ignore. I hop between many languages. - It might be a bit weird for multiple repos to have the same root commits. Not sure.
- gield 6y agoI much prefer it to be opt-in rather than opt-out. For any git project I start, I always visit https://gitignore.io https://gitignore.io.
- tuananh 6y agozsh has `gi` command which you can do like this gi macos node > .gitignore
- denkmoon 6y agoThumbnails were a mistake. thumbs.db is just as dumb as .DS_Store, I don't know how anyone thought this was a reasonable solution.
- lovelyviking 6y agoI've posted reasons in post over here, do you find them baseless?
- bacon_waffle 6y agogit can be configured to ignore .DS_Store by default - in your home directory, make a .gitignore file using the usual format, then do "git config --global core.excludesfile ~/.gitignore".
- lilyball 6y agoBetter still is to put it in ~/.config/git/ignore and leave your core.excludesFile unset, as that's the default path and will therefore live right next to your config file.
- manquer 6y agoall your team members have to also to do this, some of them like designers are not always comfortable in the command line
- NullPrefix 6y ago~/.config/git/ignore is a text file, not command line
- manquer 6y agoBy default “.” Folders are hidden in Finder , either they need reconfigure their Finder settings , or just copy paste a echo pipe in terminal. Both options are cumbersome to get others to do. They also have to redo everytime they reset their system. Since Mac will not show the folder in Finder they won’t even notice when they don’t do it , it is annoying for the rest of us.
- saagarjha 6y ago> 99% of the reason it exists is because the OS generated thumbnails. I see these in, for example, zips, that do not have images in them, and have that file. QuickLook thumbnails actually go in a different cache as they are dynamically generated. .DS_Store files contain things like folder layout information.
- swyx 6y agojust leaving this tip here, if you use node.js, `npx gitignore node` generates the appropriate git ignore files for common ignored files including ds store
- williamsmj 6y agohttps://mike.place/2020/global-gitignore/ https://mike.place/2020/global-gitignore/
- oweiler 6y ago.DS_STORE is the only entry in my global. gitignore.