Git是个分布式版本控制系统,用C语言编写的。这种分布式系统无须集中的代码库,每个人都保有源代码的完整copy(包括历史),可以在本地执行版本控制操作,然后日后合并置远程库。
(注意:以下提供的地址如连接不上,请翻墙。由于发行包都是基于unix平台的,Windows需要先装Cygwin)
Local Commands(本机使用) |
|
|
|
Get and set repository or global options |
查看及设置库或全局选项 |
|
|
Create an empty git repository or reinitialize an existing one |
创建空git库或重新初始化已有git库 |
|
|
Add file contents to the index |
将文件加入库 |
|
|
Show the working tree status |
查看哪些需要提交、哪些还没加入库 |
|
|
Record changes to the repository |
提交 |
|
|
Show commit history |
查看提交历史 |
|
|
Show information on any object |
显示各种信息(比如作者、提交者、提交时提供的信息等) |
|
|
Create, list, delete or verify tags |
创建、罗列、删除或校验标记 |
|
Remotey Commands(与远程库同步使用) |
|
|
|
Clone a repository into a new directory |
克隆一个新库 |
|
|
Manage set of tracked repositories |
管理远程库(本身还有很多选项) |
|
|
Fetch from and merge with another repository or a local branch |
从另一库或本地分支中Fetch并merge |
|
|
Download objects and refs from another repository |
下载远程库内容并保存在本地指定命名空间(本地引用),便于离线使用 |
|
|
Update remote refs along with associated objects |
用本引用更新远程引用 |
|
Branchy Commands(分支及合并) |
|
|
|
Checkout a branch or paths to the working tree |
没什么好说的,Checkout |
|
|
List, create, or delete branches |
罗列、创建、删掉分支 |
|
|
Join two or more development histories together |
把两个或多个开发历史合并在一起 |
|
|
Forward-port local commits to the updated upstream head |
怎么说呢,相当于移动分支,使其提交历史的路径发生变化(历史基点改变了) |
|
Patchy Commands |
|
|
|
Show changes between commits, commit and working tree, etc |
比较不同版本的区别 |
|
|
Apply a patch on a git index file and a working tree |
将diff的产出(即补丁)应用于文件(传统方式,后面两个命令是邮件方式) |
|
|
Prepare patches for e-mail submission |
把补丁准备成邮件格式 |
|
|
Apply a series of patches from a mailbox |
将邮箱收到的补丁邮件信息应用到当前分支(上一步的逆操作) |
|