I start using Github
2 days ago, and it's in a private repository.
So I with my friend (I appointed him as Collaborator) working a project together, but what is the best setting for .gitignore
file when you're working with a team?
Because what I'm thinking is, if Github
ignore file such as .env
(the app key) & /vendor
, the program wouldn't work as what it must to be right?
for now I using the default setting of .gitignore
files.
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
/.idea
/.vscode
/.vagrant
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.env
Please help, I already search about it but I can't get the answer.
It is easier to start with the recommendation form gitignore.io.
See gitignore.io/api/laravel
/vendor node_modules/ npm-debug.log
# Laravel 4 specific
bootstrap/compiled.php
app/storage/
# Laravel 5 & Lumen specific
public/storage
public/hot
storage/*.key
.env.*.php
.env.php
.env
Homestead.yaml
Homestead.json
# Rocketeer PHP task runner and deployment package. https://github.com/rocketeers/rocketeer
.rocketeer/
Note that ignoring folders should be specified as aFolder/
, with a trailing slash.
Any folder with generated content should be ignored.
If vendor/
is *not generated (but includes sources that you need to compile), then you should not ignore it.