码迷,mamicode.com
首页 > 其他好文 > 详细

【版本控制】Git起步

时间:2015-10-09 07:05:35      阅读:205      评论:0      收藏:0      [点我收藏+]

标签:

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


版权声明:本文为博主原创文章,未经博主允许不得转载。

【版本控制】Git起步

标签:

原文地址:http://blog.csdn.net/manoel/article/details/48980939

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!