Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5 - Mercurial recommended .hgignore

Using Laravel 5.x. or 5.1.x
What would be the basic recommended configuration for the .hgignore file?

Pulling from the .gitignore this is what I have:

syntax: glob
.env
.gitignore
.gitattributes
.idea
vendor/
node_modules/
Homestead.yaml
Homestead.json

Online I see for version 4 something about /bootstrap/compiled.php
Should I include /bootstrap/cache ?

like image 745
ScraperDave Avatar asked Oct 18 '22 22:10

ScraperDave


1 Answers

I use negative lookahead to include the empty folder structure:

## Laravel specific
^\.env$
^vendor

## General
\.DS_Store$
[Tt]humbs\.db$

## Keep these folders, but ignore their content
^bootstrap/cache/(?!\.gitignore).+$
^storage/logs/(?!\.gitignore).+$
^storage/app/(?!\.gitignore).+$
^storage/framework/views/(?!\.gitignore).+$
^storage/framework/sessions/(?!\.gitignore).+$
^storage/framework/cache/(?!\.gitignore).+$
like image 120
Jannie Theunissen Avatar answered Oct 21 '22 23:10

Jannie Theunissen