版本控制 Git起步

来源:IT165收集  发布日期:2015-10-09 20:02:42

1. Git命令行

 

?  ~  git
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>]

The most commonly used git commands are:
   add        Add file contents to the index
   bisect     Find by binary search the change that introduced a bug
   branch     List, create, or delete branches
   checkout   Checkout a branch or paths to the working tree
   clone      Clone a repository into a new directory
   commit     Record changes to the repository
   diff       Show changes between commits, commit and working tree, etc
   fetch      Download objects and refs from another repository
   grep       Print lines matching a pattern
   init       Create an empty Git repository or reinitialize an existing one
   log        Show commit logs
   merge      Join two or more development histories together
   mv         Move or rename a file, a directory, or a symlink
   pull       Fetch from and integrate with another repository or a local branch
   push       Update remote refs along with associated objects
   rebase     Forward-port local commits to the updated upstream head
   reset      Reset current HEAD to the specified state
   rm         Remove files from the working tree and from the index
   show       Show various types of objects
   status     Show the working tree status
   tag        Create, list, delete or verify a tag object signed with GPG

'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 help --all
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 '/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core'

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

'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 --version
git version 2.3.8 (Apple Git-58)

?  ~  git commit -amend

Tag标签: 版本  
  • 专题推荐

About IT165 - 广告服务 - 隐私声明 - 版权申明 - 免责条款 - 网站地图 - 网友投稿 - 联系方式
本站内容来自于互联网,仅供用于网络技术学习,学习中请遵循相关法律法规