【版本控制】Git起步

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

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

时间: 2024-08-09 10:33:13

【版本控制】Git起步的相关文章

iOS版本控制git小结--yoowei

一:准备工作 1.什么是git? git是一款开源的分布式版本控制工具. 在世界上所有的分布式版本控制工具中,git是最快.最简单.最流行的. 2.git和SVN的简单对比 速度 在很多情况下,git的速度远远比SVN快 结构 SVN是集中式管理,git是分布式管理.分布式和集中式的最大区别在于:在分布式下开发者可以本地提交,每个开发者机器上都有一个服务器的数据库. 其他 SVN使用分支比较笨拙,git可以轻松拥有无限个分支 SVN必须联网才能正常工作,git支持本地版本控制工作 旧版本的SVN

Git起步

Git起步 注:本文仅针对于git初学或之前未接触版本号控制工具的同学,希望能帮助大家高速入门. 温馨提示: 大家可跟着文章一步步去操作.建议先用一个试验的demo去学习操作. 假设直接用真实的合作项目练习,误操作有可能会存在坑队友的情况. 1. 关于版本号控制 在进入主题之前,我们先来了解一下版本号控制. 我们在使用一个工具前.一定要明白自己在做什么,这个工具给我们带来什么优点. 所谓版本号控制,事实上就是一种记录一个或若干文件内容变化.以便将来查阅特定版本号修订情况的记录系统. 简而言之.就

版本控制Git实际开发笔记

这里会把自己实际工作当中用到的git操作记录下来,供自己学习: ①新建分支: 在新版本要开发时,会基于最新版本新建一个分支,创建步骤如下: 新建本地分支[注意:这时只存在于本地,远程仓库还没有生成]: 然后切换到新建的本地分支: [说明]:以上两部操作可以合成一个命令:git checkout -b developer_V1.3.0 最后push到远程: 最后去网页中就能看到远程新建了这个分支了: ②删除远程分支: git branch -r -d origin/branch-namegit p

Help-IntelliJIDEA-2019-基础设置:3. 版本控制Git

ylbtech-Help-IntelliJIDEA-2019-基础设置:3. 版本控制Git 1.返回顶部 1. 3. 版本控制Git具体步骤:顶部工具栏 Configure ->Settings -> Version Control -> Git示例: IDEA默认集成了对Git/Svn的支持 直接设置执行程序,右边Test提示成功即可. 2. 2.返回顶部 3.返回顶部 4.返回顶部 5.返回顶部 6.返回顶部 作者:ylbtech出处:http://ylbtech.cnblogs.

【转】Git详解之一:Git起步

原文网址:http://blog.jobbole.com/25775/ 原文:<Pro Git> 起步 本章介绍开始使用 Git 前的相关知识.我们会先了解一些版本控制工具的历史背景,然后试着让 Git 在你的系统上跑起来,直到最后配置好,可以正常开始开发工作.读完本章,你就会明白为什么 Git 会如此流行,为什么你应该立即开始使用它.(查看Git详解系列的全部文章) 1.1 关于版本控制 什么是版本控制?我真的需要吗?版本控制是一种记录若干文件内容变化,以便将来查阅特定版本修订情况的系统.在

Git详解之一 Git起步

来自:http://www.open-open.com/lib/view/open1328069609436.html 起步 本章介绍开始使用 Git 前的相关知识.我们会先了解一些版本控制工具的历史背景,然后试着让 Git 在你的系统上跑起来,直到最后配置好,可以正常开始开发工作.读完本章,你就会明白为什么 Git 会如此流行,为什么你应该立即开始使用它. 1.1 关于版本控制 什么是版本控制?我真的需要吗?版本控制是一种记录若干文件内容变化,以便将来查阅特定版本修订情况的系统.在本书所展示的

Git详解之一:Git起步

原文:<Pro Git> 起步 本章介绍开始使用 Git 前的相关知识.我们会先了解一些版本控制工具的历史背景,然后试着让 Git 在你的系统上跑起来,直到最后配置好,可以正常开始开发工作.读完本章,你就会明白为什么 Git 会如此流行,为什么你应该立即开始使用它. 1.1 关于版本控制 什么是版本控制?我真的需要吗?版本控制是一种记录若干文件内容变化,以便将来查阅特定版本修订情况的系统.在本书所展示的例子中,我们仅对保存着软件源代码的文本文件作版本控制管理,但实际上,你可以对任何类型的文件进

版本控制——Git 使用笔记,以及Windows搭建Git服务器

Git和Github的关系 链接:http://www.zhihu.com/question/21907548/answer/95284202 来源:知乎 Git是一款免费.开源的分布式版本控制系统 Github是用Git做版本控制的代码托管平台 相当于本地.公司服务器.Github网站服务器都装Git做版本控制,只不过Github的服务器强大些,对全球用户托管的项目用Git做版本控制! 正是由于Github用Git做版本控制,所以可以轻松的记录项目的变迁史,然后有了下图 git是一张弓,git

版本控制 - Git

此篇blog只是对http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000 研读后的总结,还请各位看客细细品味原著. 一直以来,只是听说版本控制当推崇类似git这样的分布式版本控制,但之前使用的是SVN/subversion,而且也只限于会用add commit功能.所以连‘知其然’都没有做到.今天将对git理解整理如下,以便后用. 1. 设置机器身份: $ git config --gl