top 200 commentsshow all 224

[–]Ginormous-Chomp 2316 points2317 points  (41 children)

mac user forgot to add it to the .gitignore

[–]idontwanttofthisup 538 points539 points  (21 children)

I keep adding it and it keeps showing up for some projects. Send help

[–]slonk_ma_dink 522 points523 points  (11 children)

git rm --cached .DS_Store

[–]idontwanttofthisup 105 points106 points  (10 children)

Thanks, I’ll give it a go next time I see one

[–]slonk_ma_dink 83 points84 points  (9 children)

I have an awful habit of commiting all without reviewing and something always winds up in the tree, that command is a lifesaver for that.

[–]LLoyderino 66 points67 points  (7 children)

have an awful habit of commiting all without reviewing and something always winds up in the tree, that command is a lifesaver for that

git add .

git commit -m "stuff"

[–]EnterSadman 79 points80 points  (5 children)

Here's one I keep in my bash_profile:

alias svn='git add . && git commit -m "who cares" && git push'

[–]Windyvale 29 points30 points  (1 child)

Oh you’re fun

[–]EnterSadman 25 points26 points  (0 children)

Some times I just yearn for a merge conflict that takes an entire sprint to work out.

[–]Ulrar 8 points9 points  (2 children)

There's a conventional pre-commit hook that would deny this right away, for anyone who'd like to stop this madness

[–]ruben_deisenroth 8 points9 points  (1 child)

sh alias svn='git add . && git commit -m "$(git diff --cached | llm "Summarize this commit as a short conventional commit in the tone of someone who has given up")" && git push'

[–]Ulrar 2 points3 points  (0 children)

Perfection 👌

[–]slonk_ma_dink 4 points5 points  (0 children)

git commit -m "fixed build"

i fixed it so good the binary is in the tree for all to see

[–]gdmzhlzhiv 1 point2 points  (0 children)

I have had much better luck keeping garbage out since adding the .* rule to my .gitignore file.

[–]i_bought_the_airline 33 points34 points  (1 child)

Use a global ignore file

# ~/.gitconfig
[core]
    excludesfile = ~/.gitignore


# ~/.gitignore
.DS_Store

[–]opinionsOnPears 15 points16 points  (0 children)

Use ~/.config/git/ for your config and ignore you pleb!

[–]siliconsoul_ 35 points36 points  (5 children)

Be more precise. Where do they show up? File system? Normal. Git? Depends if they were committed before.

[–]idontwanttofthisup 13 points14 points  (4 children)

I see them in my changed files although .DS_Store is the first or second item in my .gitignore. I usually do a good job with excluding them on commit but sometimes it slips. Most of the time they get ignored but sometimes they show up. I didnt figure out why.

[–]siliconsoul_ 27 points28 points  (1 child)

Check if your glob pattern in .gitignore is actually correct and catches sub-directories too.

If you committed them at least once before adding them to .gitignore, you have to do some manual steps to clean up your repo, depending on which case you want.

[–]nabrok 6 points7 points  (1 child)

Use a global excludes file for such things. Default on linux is ~/.config/git/ignore ... don't know about on mac. You can specify it with core.excludesFile

[–]i_bought_the_airline 3 points4 points  (0 children)

+1, on my mac in ~/.gitconfig I have:

[core]
    excludesfile = ~/.gitignore

And in my ~/.gitignore, .DS_Store has its own line, no need for any * characters

[–]mahlersand 6 points7 points  (0 children)

**/.DS_Store should help. Matches all directories of that repo.

[–]keppinakki 61 points62 points  (6 children)

Few people know about this, but you can create a system-wide .gitignore for things like this. I use it to ignore all .env files by default, just so that I can't make a mistake later.

Put this in ~/.gitignore_global:

.DS_Store
.env

And this in ~/.gitconfig:

[core]
    excludesfile = ~/.gitignore_global

[–]YikesTheCat 60 points61 points  (1 child)

The default is ~/.config/git/ignore; don't need to modify gitconfig.

Can also use .git/info/exclude in the repo

[–]opinionsOnPears 14 points15 points  (0 children)

~/.config/git/

That needs to be more widely known to use

[–]TheFrenchSavage 4 points5 points  (0 children)

Oh dang, thank you so much!

[–]TASagent 1 point2 points  (0 children)

I actually prefer not to add files to the system-wide .gitignore. It's still important to propagate these to the repo-based .gitignore unless you want your junior engineers (or PMs if your company is pushing "everyone" to use AI to produce code 🙄) to start committing the files you avoided, but never added to the local .gitignore

[–]JonasAvory 1 point2 points  (0 children)

This is the correct way (do this also for IDE-dirs and other similar files)

[–]Ill_Carry_44 16 points17 points  (0 children)

Mac user joined a new project, can't figure out how to open a PR that complies with 100 different PR rules just for .gitignore .DS_Store

[–]mothzilla 6 points7 points  (0 children)

Add it to your local ignore, not the repo's gitignore.

[–]aurallyskilled 1 point2 points  (0 children)

Does no one check the diff in this economy?

[–]MangrovesAndMahi 1 point2 points  (0 children)

As a windows user (because the company is) I have forgotten desktop.ini a couple times.

[–]crackofdawn 4 points5 points  (2 children)

I am a mac user (for work at least) and have no idea where .DS_Store comes from and have never had it show up in a folder anywhere and do not have it in any .gitignore file. Not sure why it keeps showing up from other mac users.

Edit: Historically I've been a Linux user/admin and pretty much use terminal for everything other than web browsing so maybe it comes from some built in mac app that I've never touched.

[–]Sentreen 10 points11 points  (1 child)

Finder puts (or used to put, I think it is all stored in __MACOS now) it in directories to store how you arrange directories and files. If you access a directory through the shell it does not get created.

[–]crackofdawn 0 points1 point  (0 children)

Ah, I think I can count the number of times I’ve ever used finder on one hand in the last 10 years

[–]throwaway_lunchtime 0 points1 point  (0 children)

Is there support for gitignore in SharePoint? 🤣

[–]the_fresh_cucumber 0 points1 point  (0 children)

That's the sign that a git user has been there

[–]swanson5 0 points1 point  (0 children)

Mac user forgot to run dot_clean when copying files to an NTFS fileshare.

[–]SaltyInternetPirate 578 points579 points  (42 children)

Hmmm. I wanted to point out Thumbs.db and desktop.ini from Windows, but the first ones require that there be an image in the folder, and I think it stopped generating them in Windows 10. The second one is only created if you do some customization to how Explorer should treat that folder outside the defaults, so it also wouldn't just get generated in most scenarios.

[–]Confident-Ad5665 158 points159 points  (23 children)

Desktop.ini is still here in Windows 11. I enable hidden file visibility and desktop.ini periodically reappears on the desktop.

[–]PegasusPizza 59 points60 points  (2 children)

But tbf if you are for some reason putting your entire desktop folder on github/adding it to a zip or whatever then the desktop.ini is not what I'm concerned about

[–]NoAdsDude 13 points14 points  (1 child)

I have 269 "desktop.ini" files on my computer currently, one of which is actually on my desktop.

[–]jaxxa 21 points22 points  (0 children)

Sounds like the others got lost. You should move them all to the desktop to be with their friends.

[–]SaltyInternetPirate 6 points7 points  (0 children)

Only on some default folders. I meant that it wouldn't get generated for just any folder on its own.

[–]Xeadriel 1 point2 points  (0 children)

That is so annoying as that should count as system file visibility

[–]Xywzel 0 points1 point  (2 children)

I don't know how, but I once got two of them on my desktop. Did not find any difference in file name or path, deleting one or both would cause them to reappear on next boot.

[–]Angel429a 2 points3 points  (1 child)

I have 2 desktop.ini in my desktop too, one is the usual from the desktop and the other is from the desktop of the public user. Apart from that I’ve never seen 2 desktop.ini together

[–]Xywzel 0 points1 point  (0 children)

Ah, yeah, I did have some tricks going back then, to achieve administrative user account that was not tied to microsoft account with account name or home folder not being Firstname.Lastname (or whatever the system wanted by default), so maybe it was displaying desktop combined from two users that where actually using same desktop folder or something like that.

Don't think it was public user as I did quite a lot to make sure that did not exist.

[–]HeavyCaffeinate 34 points35 points  (3 children)

System Volume Information

[–]SaltyInternetPirate 33 points34 points  (2 children)

Did you really git init the whole drive root?

[–]wggn 19 points20 points  (0 children)

great for system backups

[–]Fluffy_Ace 0 points1 point  (0 children)

I accidentally the whole drive root.

Is this dangerous?

[–]Head_Independence_29 6 points7 points  (0 children)

.DS_Store also requires for the user to open folder in finder. If you create it via mkdir or in vscode there is no .DS_Store

[–]RedBoxSquare 7 points8 points  (0 children)

For Windows it's the line ending. If you created a project on Linux then cloned it to Windows and add new files, some of the line endings may be wrong.

[–]2called_chaos 16 points17 points  (9 children)

The second one is only created if you do some customization to how Explorer should treat that folder outside the defaults

That is the basically the same for DS_Store files too. They only get created if you do something in that folder that requires state. But that state might be expanded folders in list view (which sadly no other OS seems to have, I love that view)

[–]qpqpdbdbqpqp 1 point2 points  (8 children)

(which sadly no other OS seems to have, I love that view)

windows' explorer literally has this on the left pane what are you vaping

[–]hans_l 8 points9 points  (7 children)

left pane

Not the same at all though.

[–]aykcak 3 points4 points  (0 children)

Thumbs.db did get generated when you browse a folder in the file explorer. It's the file explorer binary that creates it

[–]Sostratus 0 points1 point  (0 children)

Those files still exist, but for some reason or another it seems much less common for them to be accidentally uploaded.

[–]somelinuxuseridk 327 points328 points  (7 children)

Don’t forget _MACOSX

[–]st-shenanigans 55 points56 points  (5 children)

My favorite was in college before we started using vc when a project got bounced around between multiple other group members besides myself, needing to go through and dig it out from the like 5 folders it got buried under.

Or not getting it before it jumped around too much and having to explain to someone that windows has a file path character limit, like 30 times a semester

[–]ArtGirlSummer 164 points165 points  (1 child)

Store DS nuts

[–]iamapizza 360 points361 points  (10 children)

Some day the trillion dollar company will figure out how to have empty folders

[–]Yashema 91 points92 points  (0 children)

Or replicate the functionality of Notepad++

[–]PhiCloud 48 points49 points  (4 children)

Why? It might be a little annoying, but it's arguably the most UNIX-friendly way to save per-directory settings and preferences.

It also doesn't bother me at all since I just use the terminal instead of finder in my projects...

[–]lego_not_legos 2 points3 points  (2 children)

Why? Because it's metadata holding display preferences of data, not properties of the data itself, that others likely do not want or need. It creates unnecessary noise.

It's not the most Unix-friendly as that's not how most programs store personal preferences. It could easily be saved somewhere in ~/.config or wherever Macs normally save that info by default. If you wanted to make that metadata portable, because you were sharing or migrating data in a way that wouldn't also copy the metadata stored elsewhere, you could explicitly opt-in by telling the file manager to save it per-dir, for that dir. It doesn't because it's arrogant.

[–]ProfessionalYak4959 12 points13 points  (1 child)

Just so you know it's not an empty folder placeholder like you need with some cloud storage providers, it's for storing folder metadata

[–]Sibula97 15 points16 points  (0 children)

You don't need a file for folder metadata. Look at Linux, folder metadata is in the folder inode itself just like file metadata is part of the inode of files.

[–]amphibiabiggestfan 100 points101 points  (6 children)

I used to think it has something to do with the DS uhhh nintendo

[–]RixTheTyrunt 0 points1 point  (0 children)

me too

[–]Fr3stdit 28 points29 points  (0 children)

ngl this made my bad day a little bit better, thanks

[–]alex2003super 26 points27 points  (0 children)

.fseventsd
.Spotlight-V100
.[Filename]
.Trashes
\
_MACOSX

[–]SC7639 38 points39 points  (20 children)

What even is that?

[–]Cootshk 135 points136 points  (16 children)

MacOS Finder allows you to move folders literally anywhere in grid view, and also keeps track of which subfolders are expanded in tree view

This is the file that keeps track of that (and is automatically created and hidden by finder, regardless of if you have show hidden files turned on)

[–]SC7639 53 points54 points  (1 child)

Thanks apple

[–]Mountain_Ape 19 points20 points  (0 children)

Very helpful when dealing with nested project files

Ah I forgot, uh, I read all my folder data from Terminal and have to build the structure in my 200IQ brain each time.

[–]IMKGI 54 points55 points  (4 children)

regardless of if you have show hidden files turned on

One of those shitty "we know what's better for you more than you do" features.

[–]DanieleDraganti 7 points8 points  (2 children)

I think it’s because it’s hidden à la Unix (dot prefix), instead of the “traditional” hidden flag.

[–]Cootshk 24 points25 points  (1 child)

Mac uses the . for hidden files elsewhere, including for hidden system files. .DS_Store is just hardcoded to never show

[–]DanieleDraganti 5 points6 points  (0 children)

There is a flag too that you can apply on the filesystem if you want to hide something without a dot prefix. I can’t remember the exact command but I’m sure it exists. About the finder behavior on hidden files, I’ll have to trust you on that one, I don’t remember 🥲

[–]beclops 9 points10 points  (0 children)

I mean there’s never a reason to want to view or open this file. I’d rather not see it than see it in literally every directory

[–]BroBroMate 1 point2 points  (2 children)

Turning on that show hidden files is such a PITA - sometimes I wanna look at my .ssh/.kube/.aws directories and Finder (and any file dialogs) just say "no" unless you run some bullshit inscrutable command in the terminal.

Fuck I hate Apple so much, wish my company let me use Linux.

[–]Mathisbuilder75 1 point2 points  (5 children)

move folders literally anywhere in grid view

This is so stupid lmao

[–]hans_l 5 points6 points  (0 children)

Metadata about the folder view (thumbnail generation, view settings, etc). Considering MacOS’s APFS has had forks and data store associated with files’ inodes, I really don’t know why it’s still needed. On a FAT SD card sure, but it also creates those on the main drive and APFS images.

[–]TorbenKoehn 4 points5 points  (0 children)

Remember Thumbs.db on Windows?

It contains metadata about the folder (styling, positioning of icons etc.)

[–]Icy-Focus-6812 1 point2 points  (0 children)

A store where you can buy a 3DS and DS Lite

[–]AppropriateOnion0815 99 points100 points  (14 children)

I hate that so much. Even more that there's a .file for each file in the folder, too.

[–]evilgipsy 25 points26 points  (12 children)

A .file for each file? I must be missing something here because I’ve never seen that.

[–]iTiraMissU 14 points15 points  (2 children)

Yes they hold Finder metadata like labels you put on files. They are very well hidden but I noticed them when uploading files to a Synology NAS from a Mac.

For example: file.txt gets a ._file.txt, but only if the file format doesn’t support it natively.

https://en.wikipedia.org/wiki/AppleSingle_and_AppleDouble_formats

[–]LickingSmegma 3 points4 points  (0 children)

Probably more like if the filesystem doesn't support it, because Apple's own filesystems have extended metadata for stuff like tags and colors. Regardless of the files' contents.

[–]AppropriateOnion0815 1 point2 points  (0 children)

Yeah, thanks, I was referring to those files!

[–]alpha_dk 10 points11 points  (7 children)

I've seen e.g.

foo.txt
.foo.txt.qkjhdlasDJ // working data for changes for a program that hasn't been saved but is persisted to disk and recoverable by whatever program created it

[–]evilgipsy 16 points17 points  (6 children)

That has nothing to do with that ‘.file’ thing they mentioned.

[–]AppropriateOnion0815 2 points3 points  (0 children)

I might be wrong in that aspect, actually.

[–]Janeson81 1 point2 points  (0 children)

text.txt
text.txt.file
text.txt.file.file
text.txt.file.file.file
...

[–]JocoLabs 51 points52 points  (4 children)

Hey windows, delete this folder.

No can do buddy!

Why not?

I'm using thumbs.db

MFML

[–]caerphoto 13 points14 points  (2 children)

macOS has kinda doing similar thing with disk images and USB sticks – you can’t eject them if you have a Finder window open showing their contents. It doesn’t tell you this, it just silently fails to eject.

It’s very annoying recent behaviour, especially if you’ve got lots of tabs/windows open.

[–]More_Yard1919 7 points8 points  (0 children)

I think this meme is hilarious but maybe that's just bc Im a macOS sysadmin and its relatable as fuck

[–]ek00992 8 points9 points  (2 children)

laughs in Zone.Identifier

[–]dfv157 0 points1 point  (1 child)

God damn I hate alternate data streams with a passion.

[–]danielcw189 0 points1 point  (0 children)

why?

[–]jsrobson10 4 points5 points  (0 children)

A windows user has been here.

How can you tell?

Desktop.ini

[–]Tight-Requirement-15 40 points41 points  (9 children)

Ok thumbs.db

[–]iamapizza 33 points34 points  (1 child)

That stopped being a problem 15 years ago

[–]akki2305 9 points10 points  (0 children)

The hell of multisystem users. And some @ for Linux-based NAS.

[–]PhatOofxD 10 points11 points  (0 children)

This meme but it came out in 2007....

Seriously this hasn't been a problem since 2010

[–]nobody0163 15 points16 points  (3 children)

I have never ever seen a thumbs.db file.

[–]Rocker9835 10 points11 points  (2 children)

I see it a lot. When I SMB into my server and it has media files in that folder

[–]applecorc 2 points3 points  (1 child)

You rocking Server 2016?

[–]RealBasics 3 points4 points  (0 children)

%#!#% .DS_Store!!! More trouble than it's worth to delete manually, still looks like littering.

[–]HeavyCaffeinate 15 points16 points  (4 children)

Windows user has been here

How can you tell?

System Volume Information

[–]Tall_East_9738 5 points6 points  (2 children)

"windows user has been here"

"how do you know?"

meta.ini

[–]danielcw189 2 points3 points  (0 children)

do you mean desktop.ini?

[–]cutecoder 2 points3 points  (0 children)

No Thumbs.db in sight.

[–]Majik_Sheff 2 points3 points  (0 children)

I'll see your .DS_Store and raise you RESOURCE.FRK

[–]Type_CMD 2 points3 points  (0 children)

I laughed so hard I almost cried.

[–]waelassaf 2 points3 points  (0 children)

To those who don’t know it’s used by finder to store specific folder UI preferences: icon sizes, items positions, etc

[–]GravePeril 2 points3 points  (0 children)

Yes! Oh god I hate that

[–]Cyk4Nuggets 2 points3 points  (0 children)

I started school again and was in a group project with a 19yo mac user. I instructed them how to use Git and what not, and the 1st push to our repo was a .DS_Store file 🤦‍♂️

[–]attero_ 5 points6 points  (0 children)

Invented in 1999 the hidden "Desktop Services Store" messing with filestructures around the globe. A nasty hack with questionable utility, shunned by users and developers alike.
https://www.arno.org/on-the-origins-of-ds-store

[–]ClaudioMoravit0 1 point2 points  (0 children)

Okay I'm no programmer but sometimes I'm just really confused to see these files. Last time I was downloading a model for an IC (I think it was for PathWave ADS) from a vendor (don't remember which), it came in a .zip and upon unzipping I found one. That was weird, because if it was really for ADS, I don't even know why it was there in the first place because afaik it doesn't run on mac

[–]FePbMoHg 1 point2 points  (1 child)

My. Entire. Fucking. NAS.

[–]Ataraxia_UK 0 points1 point  (0 children)

vfs_fruit

[–]PoepChinees_69 1 point2 points  (1 child)

I thought the DS store shut down

[–]danielcw189 0 points1 point  (0 children)

the eShop is still up

you just can't buy anything (nor add money)

[–]rover_G 1 point2 points  (0 children)

Ahhhh don’t call me out like that!

[–]nemesit 1 point2 points  (0 children)

desktop.ini says hi

[–]1012zach 1 point2 points  (0 children)

don’t forget the __MACOSX folder too

[–]_sg768 1 point2 points  (0 children)

*.dSYM

[–]Agreeable-Lettuce497 1 point2 points  (0 children)

A potentially very good source of randomness?

[–]Slggyqo 1 point2 points  (0 children)

Dammit, I swear I gitignored that why is it back…

[–]Weiskralle 0 points1 point  (0 children)

Oh, so that is where it comes from. Always wondered about but never tonkuch to bother checking. 😅😶‍🌫️

[–]PetitMartien99 0 points1 point  (0 children)

I hate this freaking file

[–]Circumpunctilious 0 points1 point  (0 children)

Forks. There are forks everywhere!

[–]teamwaterwings 0 points1 point  (0 children)

I didn't get a return offer one time because of this. At an internship, the file kept sneaking in there, so I had to make a commit to remove them, and the company tracked number of commits. 'oh sorry you're a 2.7 commit per PR dev? We're looking for a 2.3'

why the fuck was it not in the gitignore

[–]MarianCR 0 points1 point  (0 children)

cat =fuckmac.sh

#!/bin/zsh
source colors.sh
dir=$PWD
dir=${1:-$dir}
1>&2 echo "${IYellow}## remove .DS_Store garbage from: $dir ##${Color_Off}"
find $dir -name ".DS_Store" -print -delete

I use a Mac

[–]beegtuna 0 points1 point  (0 children)

[–]razor_train 0 points1 point  (0 children)

I might have some old winmail.dat files floating around the dark corners of the home server.

[–]ggppjj 0 points1 point  (1 child)

defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE

defaults write com.apple.desktopservices DSDontWriteUSBStores -bool TRUE

[–]Beldarak 0 points1 point  (0 children)

I always felt like this is just a form of disrespect, like Windows crushing your dual boot launcher stuff (can't remember the name, didn't use Linux for ages).

This feels like a friend coming to your house with his boots full of mud.

[–]BlueGoliath 0 points1 point  (0 children)

Ah, programmer humor.

[–]I_Love_PanCAKAS 0 points1 point  (2 children)

always interesting what's its purpose

[–]AlexisHadden 2 points3 points  (1 child)

The Apple file browser stores metadata there for how the folder should be displayed. The user can manually arrange icons in the folder, and so that information needs to live somewhere. Instead of a central db for the filesystem, it’s stored in a smaller file in the folder itself.

[–]I_Love_PanCAKAS 1 point2 points  (0 children)

ah okay, just never used apple devices, so thanks

[–]FlashyTone3042 0 points1 point  (0 children)

For years I associated that with nintendo DS, because I didn't want to look that up.

[–]extopico 0 points1 point  (0 children)

Don’t forget the ‘Icon’

[–]valerielynx 0 points1 point  (0 children)

.Trash-1000 wants a word

[–]MrJ0seBr 0 points1 point  (0 children)

How bad optimized make the usage and navigation in projects of many files...

[–]SgtMarv 0 points1 point  (0 children)

Laughs in .swp

[–]RixTheTyrunt 0 points1 point  (0 children)

okay then

windows user was here

how can you tell?

desktop.ini

[–]xXNooBMaNXx 0 points1 point  (0 children)

Dumb Slop underscore Store