若你使用 Git 時(shí)需要獲取幫助,有三種等價(jià)的方法可以找到 Git 命令的綜合手冊(manpage):
$ git help < verb >
$ git < verb > --help
$ man git-< verb >
想獲得 git config 命令的手冊,執(zhí)行
$ git help config
這些命令很棒,因?yàn)槟汶S時(shí)隨地可以使用而無需聯(lián)網(wǎng)。
如果你不需要全面的手冊,只需要可用選項(xiàng)的快速參考,那么可以用 -h 選項(xiàng)獲得更簡明的 “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
--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 chara
-
手冊
+關(guān)注
關(guān)注
2文章
118瀏覽量
28876 -
Git
+關(guān)注
關(guān)注
0文章
199瀏覽量
15765
發(fā)布評(píng)論請先 登錄
相關(guān)推薦
評(píng)論