DEV: Clean up .gitignore (#12981)
(inspired by martin-brennan's recent adventure with `tags` exclusion) **tl;dr: some of it is obsolete, some is dev-env specific and should live in *your* ~/.gitignore.** --- To enable global gitignore (`~/.gitignore`) run: ```bash git config --global core.excludesFile '~/.gitignore' ``` Then create that file and add your VIM/VSCode/Sublime/Emacs/Eclipse/RubyMine/JetBrains/macOS/Arch/Windows 95-specific stuff. --- Reasons for removal: * `bin` - never really ignored, all the files are checked in * `.DS_Store`, `._.DS_Store` - OS specific * `.sass-cache/*`, `/.bundle`, `/bundle/*`, `/cache`, `/logfile`, `!/plugins/discourse-nginx-performance-report`, `MiniProfiler/Ruby/rack-mini-profiler-2.0.1a.gem`, `config/fog_credentials.yml`, `/public/stylesheet-cache/*`, `script/download_db`, `script/refresh_db`, `config/version.rb` - no longer used? * `/log/*.log` - covered by /log * `bootsnap-load-path-cache`, `bootsnap-compile-cache` - bootsnap now keeps its ~~trash~~ temporary files in `/tmp` * `/.project`, `/.buildpath`, `/.byebug_history`, `/.idea`, `discourse.sublime-workspace`, `*~`, `*.swp`, `*.swo`, `*.swm`, `config/multisite1.yml`, `.rvmrc`, `.ruby-version`, `.ruby-gemset`, `.rbenv`, `bundler_stubs/*`, `*.db`, `*.iml`, `*.swn`, `/package-lock.json`, `.vscode`, `.envrc`, `tags` - dev-env specific, see the note at the top of the commit
This commit is contained in:
parent
b64f93aae1
commit
53c06442ef
|
@ -1,33 +1,26 @@
|
||||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
/copyright
|
||||||
#
|
/coverage
|
||||||
# If you find yourself ignoring temporary files generated by your text editor
|
/data
|
||||||
# or operating system, you probably want to add a global ignore instead:
|
/log
|
||||||
# git config --global core.excludesfile ~/.gitignore_global
|
/tmp
|
||||||
|
|
||||||
.DS_Store
|
/.env
|
||||||
._.DS_Store
|
/.procfile
|
||||||
dump.rdb
|
/dump.rdb
|
||||||
|
|
||||||
bin/*
|
/config/discourse.conf
|
||||||
|
/config/discourse.pill
|
||||||
|
/config/multisite.yml
|
||||||
|
# `discourse_dev` gem
|
||||||
|
/config/dev.yml
|
||||||
|
|
||||||
data/
|
/public/assets
|
||||||
|
/public/backups
|
||||||
.sass-cache/*
|
/public/csv
|
||||||
public/csv/*
|
/public/fonts
|
||||||
public/plugins/*
|
/public/plugins
|
||||||
public/tombstone/*
|
/public/tombstone
|
||||||
|
/public/uploads
|
||||||
# Ignore bundler config
|
|
||||||
/.bundle
|
|
||||||
/cache
|
|
||||||
/coverage/*
|
|
||||||
|
|
||||||
/public/assets/*
|
|
||||||
/public/tombstone/*
|
|
||||||
/bundle/*
|
|
||||||
|
|
||||||
config/discourse.pill
|
|
||||||
config/discourse.conf
|
|
||||||
|
|
||||||
# Ignore the default SQLite database and db dumps
|
# Ignore the default SQLite database and db dumps
|
||||||
*.sql
|
*.sql
|
||||||
|
@ -38,120 +31,29 @@ config/discourse.conf
|
||||||
/db/schema.rb
|
/db/schema.rb
|
||||||
/db/schema_cache.yml
|
/db/schema_cache.yml
|
||||||
|
|
||||||
# Ignore all logfiles and tempfiles.
|
# Plugins except for the bundled ones
|
||||||
/log/*.log
|
|
||||||
/tmp
|
|
||||||
/logfile
|
|
||||||
log/
|
|
||||||
bootsnap-load-path-cache
|
|
||||||
bootsnap-compile-cache/
|
|
||||||
|
|
||||||
# Ignore plugins except for the bundled ones.
|
|
||||||
/plugins/*
|
/plugins/*
|
||||||
!/plugins/lazy-yt/
|
|
||||||
!/plugins/poll/
|
|
||||||
!/plugins/discourse-details/
|
!/plugins/discourse-details/
|
||||||
!/plugins/discourse-nginx-performance-report
|
!/plugins/discourse-local-dates
|
||||||
!/plugins/discourse-narrative-bot
|
!/plugins/discourse-narrative-bot
|
||||||
!/plugins/discourse-presence
|
!/plugins/discourse-presence
|
||||||
|
!/plugins/lazy-yt/
|
||||||
|
!/plugins/poll/
|
||||||
!/plugins/styleguide
|
!/plugins/styleguide
|
||||||
!/plugins/discourse-local-dates
|
|
||||||
/plugins/*/auto_generated/
|
/plugins/*/auto_generated/
|
||||||
|
|
||||||
/spec/fixtures/plugins/my_plugin/auto_generated
|
/spec/fixtures/plugins/my_plugin/auto_generated
|
||||||
|
|
||||||
# Ignore Eclipse .project file
|
/vendor/bundle/*
|
||||||
/.project
|
|
||||||
|
|
||||||
# Ignore Eclipse .buildpath file
|
|
||||||
/.buildpath
|
|
||||||
|
|
||||||
# Ignore byebug history
|
|
||||||
/.byebug_history
|
|
||||||
|
|
||||||
# Ignore RubyMine settings
|
|
||||||
/.idea
|
|
||||||
|
|
||||||
# Ignore gem that is copied in
|
|
||||||
MiniProfiler/Ruby/rack-mini-profiler-2.0.1a.gem
|
|
||||||
|
|
||||||
discourse.sublime-workspace
|
|
||||||
|
|
||||||
# Vim temp files
|
|
||||||
*~
|
|
||||||
*.swp
|
|
||||||
*.swo
|
|
||||||
*.swm
|
|
||||||
|
|
||||||
# don't check in multisite config
|
|
||||||
config/multisite.yml
|
|
||||||
# don't check in my renamed multisite config as well :)
|
|
||||||
config/multisite1.yml
|
|
||||||
config/fog_credentials.yml
|
|
||||||
|
|
||||||
/public/fonts
|
|
||||||
/public/uploads
|
|
||||||
/public/backups
|
|
||||||
/public/stylesheet-cache/*
|
|
||||||
|
|
||||||
# Scripts used for downloading/refreshing db
|
|
||||||
script/download_db
|
|
||||||
script/refresh_db
|
|
||||||
|
|
||||||
# .procfile
|
|
||||||
.procfile
|
|
||||||
|
|
||||||
# .env, local environment variables for use with foreman
|
|
||||||
.env
|
|
||||||
|
|
||||||
# exclude our git version file for now
|
|
||||||
config/version.rb
|
|
||||||
|
|
||||||
# ignore the Ruby Version manager (rvm)
|
|
||||||
.rvmrc
|
|
||||||
.ruby-version
|
|
||||||
.ruby-gemset
|
|
||||||
.rbenv
|
|
||||||
bundler_stubs/*
|
|
||||||
|
|
||||||
vendor/bundle/*
|
|
||||||
*.db
|
|
||||||
|
|
||||||
# ignore jetbrains ide file
|
|
||||||
*.iml
|
|
||||||
|
|
||||||
# vim swap
|
|
||||||
*.swn
|
|
||||||
|
|
||||||
# ignore nodejs files
|
|
||||||
node_modules
|
|
||||||
/package-lock.json
|
|
||||||
|
|
||||||
/vendor/data/GeoLite2-City.mmdb
|
/vendor/data/GeoLite2-City.mmdb
|
||||||
|
|
||||||
# Vagrant
|
# Front-end
|
||||||
.vagrant
|
dist
|
||||||
|
node_modules
|
||||||
|
yarn-error.log
|
||||||
|
|
||||||
# ignore auto-generated plugin js assets
|
# Auto-generated plugin JS assets
|
||||||
/app/assets/javascripts/plugins/*
|
/app/assets/javascripts/plugins/*
|
||||||
|
|
||||||
# ignore generated api documentation files
|
# Generated API documentation files
|
||||||
openapi/*
|
openapi/*
|
||||||
|
|
||||||
# ignore VSCode config files
|
|
||||||
.vscode
|
|
||||||
|
|
||||||
# ignore direnv
|
|
||||||
.envrc
|
|
||||||
|
|
||||||
# ember-cli generated
|
|
||||||
dist
|
|
||||||
|
|
||||||
# Copyright Deposits
|
|
||||||
copyright
|
|
||||||
|
|
||||||
yarn-error.log
|
|
||||||
tags
|
|
||||||
|
|
||||||
# file used with `discourse_dev` gem in development environment.
|
|
||||||
config/dev.yml
|
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
#
|
||||||
|
# This file was generated by Bundler.
|
||||||
|
#
|
||||||
|
# The application 'rubocop' is installed as part of a gem, and
|
||||||
|
# this file is here to facilitate running it.
|
||||||
|
#
|
||||||
|
|
||||||
|
require "pathname"
|
||||||
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
||||||
|
Pathname.new(__FILE__).realpath)
|
||||||
|
|
||||||
|
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
||||||
|
|
||||||
|
if File.file?(bundle_binstub)
|
||||||
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
||||||
|
load(bundle_binstub)
|
||||||
|
else
|
||||||
|
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
||||||
|
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
require "rubygems"
|
||||||
|
require "bundler/setup"
|
||||||
|
|
||||||
|
load Gem.bin_path("rubocop", "rubocop")
|
Loading…
Reference in New Issue