using-git-worktrees
إنشاء مساحات عمل git معزولة لتطوير الميزات
متاح أيضًا من: Cycleaddict,Cygnusfear,Doyajin174,ZhanlinCui,davila7,DYAI2025,CodingCossack,obra
يواجه المطورون صعوبة في التبديل بين السياقات عند العمل على فروع متعددة. تقوم هذه المهارة بإنشاء worktrees معزولة في git حتى تتمكن من العمل على الميزات بشكل متوازٍ دون فقدان حالة مساحة العمل الحالية.
تنزيل ZIP المهارة
رفع في Claude
اذهب إلى Settings → Capabilities → Skills → Upload skill
فعّل وابدأ الاستخدام
اختبرها
استخدام "using-git-worktrees". Create a worktree for the new payment feature
النتيجة المتوقعة:
I'm using the using-git-worktrees skill to set up an isolated workspace.
Worktree ready at /projects/myapp/.worktrees/feature/payments
Tests passing (47 tests, 0 failures)
Ready to implement payment feature
استخدام "using-git-worktrees". Set up a workspace to review the api-v2 branch
النتيجة المتوقعة:
I'm using the using-git-worktrees skill to set up an isolated workspace.
Detected existing .worktrees directory
Verified directory is git-ignored
Created worktree: git worktree add .worktrees/api-v2 -b api-v2
Installed dependencies: npm install
Baseline tests: 23 passing
Worktree ready at /projects/myapp/.worktrees/api-v2
التدقيق الأمني
آمنAll 43 static findings evaluated as false positives. External commands are standard git and build tools with hardcoded or trusted arguments. Filesystem operations are legitimate directory checks. No command injection vectors, credential exposure, or malicious patterns detected.
عوامل الخطر
⚙️ الأوامر الخارجية (26)
📁 الوصول إلى نظام الملفات (14)
درجة الجودة
ماذا يمكنك بناءه
عزل تطوير الميزات
ابدأ العمل على فرع ميزة جديدة دون فقدان التغييرات غير الملتزمة أو كسر حالة مساحة العمل الحالية
التحضير لمراجعة الكود
أنشئ مساحة عمل معزولة ونظيفة لمراجعة واختبار تغييرات pull request دون التأثير على التطوير المحلي
استنساخ إصلاح الأخطاء
اعزل عمل التحقيق في الأخطاء في worktree منفصل مع الحفاظ على بيئة التطوير المستقرة
جرّب هذه الموجهات
Set up an isolated workspace for the feature/auth-improvements branch using git worktrees
Create a worktree for bugfix/memory-leak in the .worktrees directory and run the project setup
Create an isolated worktree from the pull-request-123 branch so I can review changes without affecting my current work
I need to work on the experimental/caching branch while keeping my current changes intact. Set up a worktree and verify tests pass
أفضل الممارسات
- تحقق دائماً من تجاهل أدلة worktree بواسطة git قبل إنشائها لمنع الالتزامات العرضية
- شغل اختبارات الأساس فوراً بعد إنشاء worktree لإنشاء نقطة بداية نظيفة
- اتبع ترتيب أولوية الدليل: الدليل الموجود > تفضيل CLAUDE.md > اسأل المستخدم
تجنب
- إنشاء worktrees بدون التحقق من حالة تجاهل git، مما يسبب تلوث مساحة العمل في نظام التحكم بالإصدارات
- تخطي التحقق من اختبارات الأساس، مما يجعل من المستحيل التمييز بين الأخطاء الجديدة والمشاكل الموجودة مسبقاً
- تثبيت مواقع الأدلة بدلاً من التحقق من الأدلة الموجودة وتفضيلات المستخدم أولاً