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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值