若你使用 Git 時需要獲取幫助,有三種等價的方法可以找到 Git 命令的綜合手冊(manpage):
$ git help < verb >
$ git < verb > --help
$ man git-< verb >
想獲得 git config 命令的手冊,執(zhí)行
$ git help config
這些命令很棒,因為你隨時隨地可以使用而無需聯(lián)網(wǎng)。
如果你不需要全面的手冊,只需要可用選項的快速參考,那么可以用 -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
--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瀏覽量
29173 -
Git
+關(guān)注
關(guān)注
0文章
203瀏覽量
16097
發(fā)布評論請先 登錄
Git常用的超級實用命令

git命令的基本使用
Git命令之本地分支與遠程分支關(guān)聯(lián)和解除

SVN,HG,GIT命令對照
第一本Git命令教程(六) - 日志
第一本Git命令教程(7.1)-清理之緩存
Git 命令+原理 程序員必備的基礎(chǔ)

git rebase與相關(guān)git merge命令比較

git的命令和參數(shù)
git基本操作命令用法

Git中最常用的命令介紹

評論