Skillpedia
برمجة عامة8.0k · #12654

degit

ما الذي تفعله

يوضح كيف تنسخ قالب مشروع أو نسخة مستودع إلى مجلد جديد باستخدام degit، دون سجل Git الكامل. وهو موجه إلى المطورين الذين يريدون بدء مشروع بسرعة من قالب.

متى تستخدمها

  • ✓عندما يريد مطور بدء مشروع جديد من قالب على GitHub أو GitLab.
  • ✓عندما يريد مطور نسخة من مستودع دون سجل Git الخاص به.
  • ✓عندما يريد مطور ملفات أو مجلدات محددة فقط من مستودع.

رابط المهارة

https://github.com/Rich-Harris/degit/blob/master/skills/degit/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/Rich-Harris/degit/blob/master/skills/degit/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“أريد بدء مشروع جديد من قالب بداية على GitHub. ساعدني في نسخه.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تعطي المهارة أمر نسخ لقطة المستودع إلى مجلد، وتساعد في الفروع والمجلدات الفرعية. وتعمل مع GitHub وGitLab وBitbucket وSourcehut وGists.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Help the user scaffold a project with degit. Use npx degit@latest unless they have installed degit globally.

Start with the smallest command that matches their request:

npx degit@latest user/repo
npx degit@latest user/repo my-project
npx degit@latest user/repo#branch my-project

Sources can be GitHub (user/repo, github:user/repo, or a GitHub URL), GitLab (gitlab:user/repo, a GitLab URL, or gitlab://host/user/repo), Bitbucket (bitbucket:user/repo or URL), Sourcehut (git.sr.ht/user/repo, SSH form, or URL), or Gist (https://gist.github.com/<id>, https://gist.github.com/<user>/<id>, git@gist.github.com:<id>.git, or ssh://git@gist.github.com/<id>). A #ref can name a branch, tag, or commit. A source may include a subdirectory path.

  • The destination defaults to the current directory and must be empty. Do not suggest --force unless the user explicitly wants to overwrite its contents.
  • Use --cache to require a cached copy (no network). Without --cache, degit tries the network first and falls back to the cached copy if the network is unreachable. Use --verbose to diagnose failures. --mode=git still works but is unnecessary; tar snapshots are the default.
  • Use --files <paths> or -F <paths> to clone only specific files or directories; separate multiple paths with commas or repeat the flag.
  • Private repositories are handled automatically, with SSH fallback when needed. SSH/private use requires git on PATH and working repository credentials.
  • For reusable shortcuts, use degit alias <repo> <name>, then degit <name>; use degit ls and degit unalias <name> to manage aliases.
  • If a template needs post-download changes, explain that its top-level degit.json can use clone, search_replace, and remove actions. search_replace uses a named environment variable for its replacement value.
  • A downloaded degit.json runs automatically and is template-controlled. For untrusted templates, prefer --no-actions to skip actions, or --allow-env <names> to limit which environment variables search_replace may read.

If source, ref, destination, or whether the destination is empty is unknown, ask before giving a potentially destructive command.

الأسئلة الشائعة

هل تتضمن النسخة سجل Git؟

لا. تصف المهارة degit بأنه ينسخ لقطة، لذلك لا يتضمن السجل.

هل يمكنني نسخ بعض الملفات فقط؟

نعم. تشرح المهارة كيف تنسخ ملفات أو مجلدات محددة فقط.

هل يمكنني استخدامها في مجلد فيه ملفات؟

تقول المهارة إن المجلد الوجهة يجب أن يكون فارغًا، ولا تقترح فرض الكتابة فوق الملفات إلا إذا أردت ذلك فعلًا.

التفاصيل

الوصف الأصلي من المؤلف

Download a repository snapshot or template with degit

repo: Rich-Harris/degit

الشعبية

نجوم GitHub
8.0k
الترتيب
#12654
الترخيص
MIT
آخر تحديث
21‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

مهارات مشابهة