Define paths in gitignore in a consistent way

We used a slash as a prefix in some cases but not in other cases. Now
we're defining files and folders following the gitignore rules: files
starting with a slash are only ignored in the root folder, while files
not starting with it are ignored everywhere.

IMHO it makes sense to ignore all folders named `tmp`, `.bundle`, `log`,
`.DS_Store` or `.ruby-gemset` everywhere in the source code and not only
in the root folder.

We're also adding a trailing slash to all folders for consistency.
This commit is contained in:
Javi Martín
2021-12-09 18:00:18 +01:00
parent f5152179e1
commit fc70ba3db5

20
.gitignore vendored
View File

@@ -5,12 +5,12 @@
# git config --global core.excludesfile '~/.gitignore_global'
# Ignore bundler config.
/.bundle
.bundle/
# Ignore all logfiles and tempfiles.
/log/*
!/log/.keep
/tmp
log/*
!log/.keep
tmp/
/spec/examples.txt
/config/database.yml
@@ -18,7 +18,7 @@
/config/deploy-secrets.yml
/config/maintenance.yml
/coverage
/coverage/
.byebug_history
@@ -27,9 +27,9 @@
.ruby-gemset
public/sitemap.xml
public/assets/
public/machine_learning/data/
public/system/
/public/sitemap.xml
/public/assets/
/public/machine_learning/data/
/public/system/
/public/ckeditor_assets/
storage/
/storage/