Chapters ▾ 2nd Edition

1.6 شروع به کار (getting started) - دریافت کمک (Getting Help)

دریافت کمک (Getting Help)

اگر هر زمان هنگام استفاده از Git به کمک نیاز داشتید، سه روش معادل برای دریافت راهنمای جامع (صفحه‌ی راهنما یا manpage) برای هر یک از دستورات Git وجود دارد:

$ git help <verb>
$ git <verb> --help
$ man git-<verb>

برای مثال، می‌توانید راهنمای صفحه‌ی man برای دستور "git config" را با اجرای این دستور دریافت کنید:

$ git help config

این دستورات خیلی خوب هستند چون می‌توانید به آن‌ها از هر جایی دسترسی داشته باشید، حتی به‌صورت آفلاین. اگر صفحات راهنما (manpages) و این کتاب برایتان کافی نبود و به کمک حضوری نیاز داشتید، می‌توانید به کانال‌های #git، #github یا #gitlab در سرور IRC به نام Libera Chat مراجعه کنید، که آدرس آن این است: https://libera.chat/. این کانال‌ها معمولاً پر از صدها نفر با دانش بالا درباره Git هستند که اغلب آماده‌ی کمک‌رسانی‌اند.

علاوه بر این، اگر به راهنمای کامل صفحه man نیازی ندارید و فقط می‌خواهید سریع یادآوری کنید گزینه‌های موجود برای یک دستور Git چیست، می‌توانید با گزینه‌ی -h خروجی خلاصه‌تر و ساده‌تری با عنوان "help" درخواست کنید، مانند:

$ git add -h
usage: git add [<options>] [--] <pathspec>...

    -n, --dry-run               dry run
    -v, --verbose               be verbose

    -i, --interactive           interactive picking
    -p, --patch                 select hunks interactively
    -e, --edit                  edit current diff and apply
    -f, --force                 allow adding otherwise ignored files
    -u, --update                update tracked files
    --renormalize               renormalize EOL of tracked files (implies -u)
    -N, --intent-to-add         record only the fact that the path will be added later
    -A, --all                   add changes from all tracked and untracked files
    --ignore-removal            ignore paths removed in the working tree (same as --no-all)
    --refresh                   don't add, only refresh the index
    --ignore-errors             just skip files which cannot be added because of errors
    --ignore-missing            check if - even missing - files are ignored in dry run
    --sparse                    allow updating entries outside of the sparse-checkout cone
    --chmod (+|-)x              override the executable bit of the listed files
    --pathspec-from-file <file> read pathspec from file
    --pathspec-file-nul         with --pathspec-from-file, pathspec elements are separated with NUL character
scroll-to-top