Git basic command

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


$ git help --all
/* 
usage: git [--version] [--exec-path[=<path>]] [--html-path]
           [-p|--paginate|--no-pager] [--no-replace-objects]
           [--bare] [--git-dir=<path>] [--work-tree=<path>]
           [-c name=value] [--help]
           <command> [<args>]

available git commands in 'D:\Program Files (x86)\Git/libexec/git-core'
*/
-----------------------------------------------------------------------
  add                 hash-object         relink
  add--interactive    help                remote
  am                  http-backend        remote-ext
  annotate            http-fetch          remote-fd
  apply               http-push           remote-ftp
  archive             imap-send           remote-ftps
  bisect              index-pack          remote-http
  bisect--helper      init                remote-https
  blame               init-db             remote-testgit
  branch              log                 repack
  bundle              lost-found          replace
  cat-file            ls-files            repo-config
  check-attr          ls-remote           request-pull
  check-ref-format    ls-tree             rerere
  checkout            mailinfo            reset
  checkout-index      mailsplit           rev-list
  cherry              merge               rev-parse
  cherry-pick         merge-base          revert
  citool              merge-file          rm
  clean               merge-index         send-email
  clone               merge-octopus       send-pack
  commit              merge-one-file      sh-setup
  commit-tree         merge-ours          shortlog
  config              merge-recursive     show
  count-objects       merge-resolve       show-branch
  daemon              merge-subtree       show-index
  describe            merge-tree          show-ref
  diff                mergetool           stage
  diff-files          mergetool--lib      stash
  diff-index          mktag               status
  diff-tree           mktree              stripspace
  difftool            mv                  submodule
  difftool--helper    name-rev            svn
  fast-export         notes               symbolic-ref
  fast-import         pack-objects        tag
  fetch               pack-redundant      tar-tree
  fetch-pack          pack-refs           unpack-file
  filter-branch       parse-remote        unpack-objects
  fmt-merge-msg       patch-id            update-index
  for-each-ref        peek-remote         update-ref
  format-patch        prune               update-server-info
  fsck                prune-packed        upload-archive
  fsck-objects        pull                upload-pack
  gc                  push                var
  get-tar-commit-id   quiltimport         verify-pack
  grep                read-tree           verify-tag
  gui                 rebase              web--browse
  gui--askpass        rebase--interactive whatchanged
  gui--askyesno       receive-pack        write-tree
  gui.tcl             reflog

// See 'git help <command>' for more information on a specific command.

猜你喜欢

转载自fengjiangtao.iteye.com/blog/2205493