Skip to content

Instantly share code, notes, and snippets.

@jeromecoupe
Last active September 21, 2020 10:38
Show Gist options
  • Save jeromecoupe/5237810 to your computer and use it in GitHub Desktop.
Save jeromecoupe/5237810 to your computer and use it in GitHub Desktop.
craftcms .gitignore (craft 3)
# Craft
# --------------------------
/.env
/vendor/
# files generated by build process
/web/dist/
# user uplodaded files
/web/uploads/
# DB Dumps
# --------------------------
/db_dumps/
# node modules
# --------------------------
/node_modules/
# misc
# --------------------------
.idea
.DS_Store
@BenParizek
Copy link

I think you may be able to ignore the entire runtime folder.

craft/storage/runtime/*

I've also added the backups folder as we keep backups elsewhere so no real need to have them in the repo too:

craft/storage/backups/*

@jeromecoupe
Copy link
Author

Thanks guys! Updated

@aaron: I keep .gitignore out because it is a git-specific file and, as such, I see it as not belonging in the repo itself (everybody has its own copy). That being said, now that I think about it after your comment, it makes sense to keep it in when working teams.

@jeromecoupe
Copy link
Author

Updated for Craft 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment