Stop Thumbs.db files in certain folders

5

I'm a big fan of folder+file thumbnailing, so I'm all for thumbs.db files.

However, I'm working on a Git project, so every time I commit my git folder to the online repository, some thumbs.db files get uploaded too. This is incredibly annoying, both for me and my co-workers, as we want to see the project files, not some thumbnail file that have no effect once they are off my hard drive.

I've read about turning them off. But I'd like to keep them on in places, so I can quickly see the thumbnails of my photos, for example.

Can I turn the thumbnail cache off in just one directory, so I can keep my project clear of them?

ACarter

Posted 2013-07-27T15:30:30.453

Reputation: 1 044

Answers

8

You can simply add

Thumbs.db

to your .gitignore. This will keep the files in place on your local file system, but Git won't add them, or commit, for that matter.

slhck

Posted 2013-07-27T15:30:30.453

Reputation: 182 472

Note that you have to actually add Thumbs.db, not thumbs.db, at least it is so when using Tortoise Git. Anyway I see no reason to start this line with lowercase letter, because Windows always names these files from capital letter. – Konstantin Pereiaslov – 2014-07-04T08:41:19.423

@KonstantinPereyaslov True. Just that the OP specified a lowercase thumbs.db, so I took that literally. – slhck – 2014-07-04T08:44:42.617

@slhck,does any problem occur in production server if without thumbs.db? – kittygirl – 2019-01-08T12:03:44.253

1@kittygirl No, this is not needed. In fact you should definitely remove it from any version control! – slhck – 2019-01-08T12:11:11.927

Didn't think of doing it this way round. Thanks. – ACarter – 2013-07-27T15:59:38.937