github/gitignore · Ruby.gitignore

شرح قالب .gitignore لـ Ruby

يشرح سبب تجاهل Ruby.gitignore لحزم gem ومجلد تثبيت Bundler ونتائج الاختبارات والوثائق المولَّدة، ومعايير إيداع Gemfile.lock و.ruby-version.

فتح في المولّد فتح مع Rails, macOS, JetBrains

Ruby.gitignore مخصص للمشاريع التي تبني gem أو تطوّر سكربتات وتطبيقات Ruby. تبدأ معظم قواعده بـ / فهي مثبّتة في جذر المستودع، فيقل احتمال تجاهل مجلد فرعي بالاسم نفسه عن طريق الخطأ.

في تطبيقات Rails يغطي قالب Rails حالات أكثر من هذا القالب. وإذا اخترت الاثنين معًا نُظّمت القواعد المتداخلة عبر إزالة التكرار.

شرح القواعد

النمطما الذي يتجاهله ولماذا
*.gem/pkg/حزم gemملفات الحزم التي ينشئها gem build وrake build. إنها مخرجات تُنشر على RubyGems.
/.bundle//vendor/bundle/lib/bundler/man/Bundlerيحوي .bundle/ إعدادات Bundler المحلية، ويحوي vendor/bundle حزم gem المثبّتة عبر bundle install --path. يمكن إعادة تثبيتها على حاسوب آخر.
/coverage//spec/reports//spec/examples.txt/test/tmp//test/version_tmp/نتائج الاختباراتنتائج التشغيل مثل مخرجات SimpleCov وتقارير RSpec والملف examples.txt الذي يتذكر فيه RSpec الأمثلة الفاشلة.
/.yardoc//_yardoc//doc//rdoc/الوثائق المولَّدةوثائق API التي أنشأها YARD وRDoc وذاكراتهما. يُعاد إنشاؤها من تعليقات الشيفرة المصدرية.
/tmp/.byebug_history.repl_history*.rbc/.config/InstalledFilesملفات مؤقتة وملفات المصححالمجلد المؤقت، وسجلات byebug وREPL، والشيفرة البايتية لـ Rubinius، وسجل تثبيت setup.rb.
.rvmrcإعدادات مدير الإصداراتملف إعدادات المشروع القديم في RVM، ويمكنه تنفيذ شيفرة الصدفة (shell) فتُتجنب مشاركته. اليوم يُستخدم .ruby-version في الغالب.

ملاحظات عملية

القالب الأصلي

Ruby.gitignoreالقواعد: 26 سطرًا
*.gem*.rbc/.config/coverage//InstalledFiles/pkg//spec/reports//spec/examples.txt/test/tmp//test/version_tmp//tmp/# Used by dotenv library to load environment variables.# .env# Ignore Byebug command history file..byebug_history## Specific to RubyMotion:.dat*.repl_historybuild/*.bridgesupportbuild-iPhoneOS/build-iPhoneSimulator/## Specific to RubyMotion (use of CocoaPods):## We recommend against adding the Pods directory to your .gitignore. However# you should judge for yourself, the pros and cons are mentioned at:# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control## vendor/Pods/## Documentation cache and generated files:/.yardoc//_yardoc//doc//rdoc/## Environment normalization:/.bundle//vendor/bundle/lib/bundler/man/# for a library or gem, you might want to ignore these files since the code is# intended to run in multiple environments; otherwise, check them in:# Gemfile.lock# .ruby-version# .ruby-gemset# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:.rvmrc# Used by RuboCop. Remote config files pulled in from inherit_from directive.# .rubocop-https?--*

مصدر القوالب: github/gitignore/Ruby.gitignore @356fd7b (2026-09-11) · CC0-1.0

قوالب تُستخدم معه

شروح قوالب أخرى