3 Minutes with Kent
3 Minutes with Kent
Kent C. Dodds
Global gitignore and .ignored files/folders
2 minutes Posted May 26, 2021 at 10:25 am.
0:00
2:56
Download MP3
Show notes

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. I
have 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 dot
ignored 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 require
dependencies 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 sort
of 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,Or
like 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 way
that 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 any
of 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 my
computer 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 I
still 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 as
well 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 settings

in 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 yeah
anyway 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.