Global gitignore and .ignored files/folders - a podcast by Kent C. Dodds

from 2021-05-26T17:25:21

:: ::

Hello there friends So this morning I was just thinking about this little
tip that I share with you. It's pretty quick. In my global git ignore,
which is located in my home directory dot get ignore underscore global. Ihave a couple of things in here that I wanted to shout out and specifically
this morning.I was thinking about my ignored global good ignore. So I am I have a two
rules that will ignore any files that or any directories that end in dotignored in any files that include dot ignored dot in the file name and so
what this allows me to do is very easy.Within the context of my project create a temporary file like temp dot
ignored.js where I can script up a little things. I can requiredependencies and require files in my application and whatever all within
the context of the app and I can mess around kind of like a playground sortof thing to work on something until I have it solid and then I can take
that code over to where it actually is.This can be really helpful when the feature that I'm working on is
difficult to like navigate to or whatever the case may be. And so yeah,Orlike it takes a series of steps even if it's not a UI thing if it takes a
series of steps to get it to this particular state.Having a little file that I can use as a playground that doesn't have
anything to do with get or whatever is really helpful. So yeah, the waythat I do that is a star dot ignored slash and so that's for directories
that end in dot ignored and star dot ignored dot star which will ignore anyof the files that I included dot ignored.
A couple other things that I have in here that sometimes people don't have.
So this isGoogle ignore this applies to all of the get projects in my on mycomputer a dot ds underscore store and so when you open up a directory in
in the Finder app on a Mac and creates this really annoying file and Istill get pull requests from people all the time that included dot ds store
and so I think I actually add that to my get ignore for each project aswell when it's like an open source thing just to not deal with that.
Also dot VS code. I know sometimes you can set like,Little local settingsin there and so sometimes I'll force add those but by default. I don't want
that in there dot idea for web storm and then you've got some like NPM and
yarn debug stuff some VIM stuff in here with a star dots SWP and yeahanyway just kind of some helpful tips.
I think the biggest one is the diagnord. I also have dot local sometimes.I'll put that in projects for like here's the dot EMV dot local, so it's
just the stuff that's local on my machine. I don't want to commit that.
Hope that.Helps. Have a wonderful day.

Further episodes of 3 Minutes with Kent

Further podcasts by Kent C. Dodds

Website of Kent C. Dodds