That's good and all, but as @matthias
mentioned, it's still important to add them to your repositories because other people will also work on them. They might not have configured their global .gitignore like you have, which might cause them to accidentally commit the .env file.
Itβs a good idea to put such things into your global .gitignore.
But keep in mind that you mostly work in projects with other people, so you have to put those things into your repositories .gitignore too, to avoid that your co-workers commit secrets.
That's good and all, but as @matthias mentioned, it's still important to add them to your repositories because other people will also work on them. They might not have configured their global
.gitignore
like you have, which might cause them to accidentally commit the.env
file.Itβs a good idea to put such things into your global
.gitignore
.But keep in mind that you mostly work in projects with other people, so you have to put those things into your repositories
.gitignore
too, to avoid that your co-workers commit secrets.oh thank you. :) I care this.