craftcms/craft

What are the Craft 3 `craft/storage` gitignore recommendations?

Closed this issue · 1 comments

olets commented

What are the gitignore recommendations for Craft 3? I'm especially wondering about craft/storage/userphotos and craft/storage/logo

https://craftcms.com/support/craft-storage-gitignore recommends ignoring craft/storage/backups/, craft/storage/runtime/, and craft/storage/userphotos/, and keeping craft/storage/rebrand/ — so,

/craft/storage/*
!/craft/storage/rebrand

But the latest craft/storage/.gitignore has

backups
logs
runtime

which keeps craft/storage/userphotos.

Meanwhile various sources (notably https://github.com/github/gitignore/blob/master/CraftCMS.gitignore, citing what I guess must be an old version of the documentation linked above) recommend keeping craft/storage/logo and ignoring craft/storage/rebrand with

/craft/storage/*
!/craft/storage/logo/*

For Craft 3 we’d recommend you go with the default storage/.gitignore as a starting point.

In Craft 3, user photos are stored in an actual asset volume, and it’s up to you where that should live (ideally somewhere in your web root).

I just added a note to the top of that support article to make it clear it was written for Craft 2 and not applicable to Craft 3. Sorry for the mixed signals!