章節 ▾
第二版
-
1. 開始
-
2. Git 基礎
-
3. Git 分支
-
4. 伺服器上的 Git
- 4.1 協定
- 4.2 在伺服器上安裝 Git
- 4.3 產生您的 SSH 公開金鑰
- 4.4 設定伺服器
- 4.5 Git Daemon
- 4.6 Smart HTTP
- 4.7 GitWeb
- 4.8 GitLab
- 4.9 第三方託管選項
- 4.10 總結
-
5. 分散式 Git
-
A1. 附錄 A:其他環境中的 Git
- A1.1 圖形介面
- A1.2 Visual Studio 中的 Git
- A1.3 Visual Studio Code 中的 Git
- A1.4 IntelliJ / PyCharm / WebStorm / PhpStorm / RubyMine 中的 Git
- A1.5 Sublime Text 中的 Git
- A1.6 Bash 中的 Git
- A1.7 Zsh 中的 Git
- A1.8 PowerShell 中的 Git
- A1.9 總結
-
A2. 附錄 B:在您的應用程式中嵌入 Git
-
A3. 附錄 C:Git 命令
1.7 開始 - 取得協助
取得協助
如果您在使用 Git 時需要任何協助,有三種等效的方式可以取得任何 Git 命令的完整手冊頁面(manpage)說明
$ git help <verb>
$ git <verb> --help
$ man git-<verb>
例如,您可以透過執行以下命令來取得 git config
命令的手冊頁面說明
$ git help config
這些命令很好用,因為您可以在任何地方存取它們,即使在離線狀態下也一樣。如果手冊頁面和本書不足以滿足您的需求,並且您需要面對面的協助,您可以嘗試 Libera Chat IRC 伺服器上的 #git
、#github
或 #gitlab
頻道,網址為 https://libera.chat/。這些頻道通常有數百位對 Git 非常了解且樂於助人的人。
此外,如果您不需要完整的手冊頁面說明,而只需要快速複習 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