Chapters ▾ 2nd Edition

1.7 Kom igång - Få hjälp

Få hjälp

Om du någon gång behöver hjälp med Git finns det tre likvärdiga sätt att se den fullständiga manualsidan (man‑sidan) för vilket Git‑kommando som helst:

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

Till exempel kan du få manualsidan för kommandot git config genom att köra:

$ git help config

Dessa kommandon är smidiga eftersom du kan använda dem överallt, även utan uppkoppling. Om manualsidorna och boken inte räcker och du behöver personlig hjälp kan du prova kanalerna #git, #github eller #gitlab på Libera Chat IRC-servern, som finns på https://libera.chat/. På dessa kanaler samlas regelbundet hundratals personer som är kunniga i Git och ofta villiga att hjälpa till.

Dessutom, om du inte behöver hela manualsidan utan bara en snabb påminnelse om vilka flaggor som finns för ett Git-kommando, kan du be om den kortare hjälpen med -h-flaggan, till exempel:

$ 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