.gitignore file for Laravel – Shared Hosting – Hostinger

The .gitignore file contains rules for what files and folders to exclude from git source control.  When you use Laravel you don’t want the vendor files and certain logs to versioned and pulled into your git repository and pushed to histinger shared hosting. You need to add some rules to the gitignore file to exclude this folder from the repository.

Visual Studio comes with a standard gitignore file. But that’s not complete.

### Code ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

### Laravel ###
/vendor
/node_modules/
npm-debug.log
yarn-error.log
DO_NOT_UPLOAD_HERE
readme*
sitemap*

### Laravel 4 specific ###
bootstrap/compiled.php
app/storage/

### Laravel 5 & Lumen specific ###
public/storage
public/hot
storage/*.key
.env
Homestead.yaml
Homestead.json
/.vagrant
.phpunit.result.cache
storage/logs/*

### environment file ###
.env
.env.example

### Public Files ###
/public_html/css/*.scss
/public_html/css/*.css.map
/public_html/files/*

### Hostinger Files ###
*.sqlite
acme-client
.cache
.cagefs
.cl.selector
.config
.local
.ssh
messagesystemctl
*microsoft.gpg
.bash*
/v8-compile-cache-0

Gist For the above .gitignore