Git
章 ▾ 第2版

1.7 はじめに - ヘルプ

ヘルプ

Gitの使用中にヘルプが必要になった場合は、Gitコマンドの包括的なマニュアルページ(manページ)ヘルプを取得するための、同等の3つの方法があります。

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

たとえば、git configコマンドのmanページヘルプを取得するには、これを実行します。

$ git help config

これらのコマンドは、オフラインでもどこからでもアクセスできるため便利です。 manページとこの書籍では十分でなく、対面でのヘルプが必要な場合は、Libera Chat IRCサーバーの#git#github、または#gitlabチャンネルを試してみてください。これはhttps://libera.chat/にあります。これらのチャンネルは、Gitに精通しており、喜んで手伝ってくれる人が大勢います。

さらに、完全なmanページヘルプは必要ないが、Gitコマンドで使用可能なオプションを簡単に確認したい場合は、-hオプションを使用して、より簡潔な「ヘルプ」出力を要求できます。例:

$ 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