工程效率与工具 · 教程

其他命令

本文写于 2021 年,涉及的组件版本、配置与数据可能已过时,请按经验材料阅读并核对当前版本。原文链接与内容保持不变。
usage: git [--version] [--help] [-C <path>] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]

available git commands in '/usr/local/git/libexec/git-core'

  add                       diff-index                merge-octopus             reset
  add--interactive          diff-tree                 merge-one-file            rev-list
  am                        difftool                  merge-ours                rev-parse
  annotate                  difftool--helper          merge-recursive           revert
  apply                     fast-export               merge-resolve             rm
  archimport                fast-import               merge-subtree             send-email
  archive                   fetch                     merge-tree                send-pack
  bisect                    fetch-pack                mergetool                 sh-i18n--envsubst
  bisect--helper            filter-branch             mktag                     shell
  blame                     fmt-merge-msg             mktree                    shortlog
  branch                    for-each-ref              mv                        show
  bundle                    format-patch              name-rev                  show-branch
  cat-file                  fsck                      notes                     show-index
  check-attr                fsck-objects              p4                        show-ref
  check-ignore              gc                        pack-objects              stage
  check-mailmap             get-tar-commit-id         pack-redundant            stash
  check-ref-format          grep                      pack-refs                 status
  checkout                  gui                       patch-id                  stripspace
  checkout-index            gui--askpass              prune                     submodule
  cherry                    hash-object               prune-packed              submodule--helper
  cherry-pick               help                      pull                      subtree
  citool                    http-backend              push                      svn
  clean                     http-fetch                quiltimport               symbolic-ref
  clone                     http-push                 read-tree                 tag
  column                    imap-send                 rebase                    unpack-file
  commit                    index-pack                rebase--helper            unpack-objects
  commit-tree               init                      receive-pack              update-index
  config                    init-db                   reflog                    update-ref
  count-objects             instaweb                  remote                    update-server-info
  credential                interpret-trailers        remote-ext                upload-archive
  credential-cache          log                       remote-fd                 upload-pack
  credential-cache--daemon  ls-files                  remote-ftp                var
  credential-store          ls-remote                 remote-ftps               verify-commit
  cvsexportcommit           ls-tree                   remote-http               verify-pack
  cvsimport                 mailinfo                  remote-https              verify-tag
  cvsserver                 mailsplit                 remote-testsvn            web--browse
  daemon                    merge                     repack                    whatchanged
  describe                  merge-base                replace                   worktree
  diff                      merge-file                request-pull              write-tree
  diff-files                merge-index               rerere

git commands available from elsewhere on your $PATH

  credential-osxkeychain

'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.

除去上篇文章中介绍的命令,这些命令就相对高端了~,我们还是挑一些可以用得到来分享。

命令解释

  • git hash-object

最后

期望与你一起遇见更好的自己

期望与你一起遇见更好的自己

配套资料 · 免费领取
本文属于「TOOLS」资料包范围:Git 与效率工具速查表。常用命令与工作流速查。
在公众号「方家小白」回复关键词 TOOLS 即可领取。全文无需关注即可阅读。
TOOLS