1.7 入门 - 获取帮助

获得帮助

如果您在使用Git时需要帮助,可以使用三种等效的方法来获取有关任何Git命令的全面手册页(手册)帮助:

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

例如,您可以git config通过运行以下命令获取命令的手册帮助

$ git help config

这些命令很好用,因为您可以在任何地方访问它们,甚至可以脱机访问它们。如果手册页和本书还不够,并且您需要亲自帮助,则可以在Freenode IRC服务器上尝试#gitor#github频道,可以在https://freenode.net上找到它。这些渠道经常有数百人,他们都非常了解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
    --chmod (+|-)x        override the executable bit of the listed files
发布了19 篇原创文章 · 获赞 0 · 访问量 892

猜你喜欢

转载自blog.csdn.net/qq_32036981/article/details/103624796
1.7